Get rid of explicit ErrorInfo constructors
This commit is contained in:
@@ -9,11 +9,10 @@ namespace nix {
|
||||
|
||||
LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s))
|
||||
{
|
||||
throw EvalError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt(s),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
throw EvalError({
|
||||
.hint = hintfmt(s),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
}
|
||||
|
||||
LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v))
|
||||
@@ -24,11 +23,10 @@ LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v))
|
||||
|
||||
LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const Value & v))
|
||||
{
|
||||
throw TypeError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt(s, showType(v)),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
throw TypeError({
|
||||
.hint = hintfmt(s, showType(v)),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user