mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 09:12:11 +08:00
[math] Add two error strings as fallback
This commit is contained in:
parent
f60e1549a9
commit
642a1db4fc
@ -114,7 +114,7 @@ static const wchar_t *math_get_arg(int *argidx, wchar_t **argv, wcstring *storag
|
||||
}
|
||||
|
||||
wcstring math_describe_error(te_error_t& error) {
|
||||
if (error.position == 0) return L"";
|
||||
if (error.position == 0) return L"NO ERROR?!?";
|
||||
assert(error.type != TE_ERROR_NONE && L"Error has no position");
|
||||
|
||||
switch(error.type) {
|
||||
@ -125,7 +125,7 @@ wcstring math_describe_error(te_error_t& error) {
|
||||
case TE_ERROR_TOO_MANY_ARGS: return _(L"Too many arguments");
|
||||
case TE_ERROR_MISSING_OPERATOR: return _(L"Missing operator");
|
||||
case TE_ERROR_UNKNOWN: return _(L"Expression is bogus");
|
||||
default: return L"";
|
||||
default: return L"Unknown error";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user