Narrow the «not defined» check to just ThrownError
This commit is contained in:
parent
c7c684aaa3
commit
0adf77e2ee
@ -352,7 +352,7 @@ void printValue(Context * ctx, Out & out, std::variant<Value, std::exception_ptr
|
|||||||
ctx->state->forceValueDeep(v);
|
ctx->state->forceValueDeep(v);
|
||||||
out << v;
|
out << v;
|
||||||
}
|
}
|
||||||
} catch (Error & e) {
|
} catch (ThrownError & e) {
|
||||||
if (e.msg() == "The option `" + path + "' is used but not defined.") {
|
if (e.msg() == "The option `" + path + "' is used but not defined.") {
|
||||||
// 93% of errors are this, and just letting this message through would be
|
// 93% of errors are this, and just letting this message through would be
|
||||||
// misleading. These values may or may not actually be "used" in the
|
// misleading. These values may or may not actually be "used" in the
|
||||||
@ -365,6 +365,8 @@ void printValue(Context * ctx, Out & out, std::variant<Value, std::exception_ptr
|
|||||||
} else {
|
} else {
|
||||||
out << describeError(e);
|
out << describeError(e);
|
||||||
}
|
}
|
||||||
|
} catch (Error & e) {
|
||||||
|
out << describeError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user