mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-15 07:26:05 +09:00
exception caused by an app that is not handled by TVDOS will now print out stack trace before causing the computer to shut down
This commit is contained in:
@@ -397,7 +397,20 @@ var execApp = (cmdsrc, args) => {
|
||||
`var _appStub=function(exec_args){${injectIntChk(cmdsrc, intchkFunName)}\n};` +
|
||||
`_appStub`); // making 'exec_args' a app-level global
|
||||
|
||||
return execAppPrg(args);
|
||||
try {
|
||||
execAppPrg(args);
|
||||
}
|
||||
catch (e) {
|
||||
printerrln(
|
||||
`
|
||||
\\|/ ____ \\|/
|
||||
"@'/ ,. \\'@"
|
||||
/_| \\__/ |_\\
|
||||
\\__U_/
|
||||
Kernel panic - ${e.stack}`
|
||||
)
|
||||
serial.printerr(e.stack)
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -377,7 +377,10 @@ shell.coreutils = {
|
||||
let contents = filesystem.readAll(CURRENT_DRIVE);
|
||||
// TODO just print out what's there
|
||||
print(contents);
|
||||
}
|
||||
},
|
||||
/*panic: function(args) {
|
||||
throw Error("Artificial Kernel Panic Triggered")
|
||||
}*/
|
||||
};
|
||||
shell.coreutils.chdir = shell.coreutils.cd;
|
||||
Object.freeze(shell.coreutils);
|
||||
|
||||
Reference in New Issue
Block a user