mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
js: Return 1 after exception in non-REPL mode
This commit is contained in:
parent
fb67bc2f4f
commit
a769db6078
1 changed files with 3 additions and 2 deletions
|
@ -380,9 +380,10 @@ int main(int argc, char** argv)
|
|||
printf("Uncaught exception: ");
|
||||
print(interpreter->exception()->value());
|
||||
interpreter->clear_exception();
|
||||
} else if (print_last_result) {
|
||||
printf("%s\n", result.to_string().characters());
|
||||
return 1;
|
||||
}
|
||||
if (print_last_result)
|
||||
print(result);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue