CommandHelper
CommandHelper copied to clipboard
Add file option for pausing cmdline on script exception
Allows users to see exceptions from scripts that were executed through an extension associated with mscript.exe.
Points of interest:
- File option defaults to false, maintaining current behavior.
- Compile errors during lexing happen too early for this file option to apply. It is possible to get the file options that are parsed in the lexer for early usage, but there's no obvious way to expose those.
- When
System.console() == null, the file option is ignored (there's no console anyways, so pausing would not make sense). - The implementation uses
Cmdline.prompt_char. This could be moved to some utils class if accessing that is not desired.