TeaSpeak-Client/native/crash_handler/test/crash_test.ts

31 lines
899 B
TypeScript
Raw Normal View History

2019-06-26 16:09:01 -04:00
//__filename
2019-07-05 17:47:55 -04:00
module.paths.push("../../build/linux_x64");
2019-06-26 16:09:01 -04:00
module.paths.push("../../build/win32_64");
const electron = require("electron");
const crash_handler = require("teaclient_crash_handler");
2019-07-05 17:47:55 -04:00
if(process.argv.length != 3) {
2019-06-26 16:09:01 -04:00
electron.app.on('ready', () => {
console.log("SHow dialog");
electron.dialog.showMessageBox({
message: "Arguments: " + JSON.stringify(process.argv)
});
electron.app.exit();
});
} else {
crash_handler.setup_crash_handler(
"test",
__dirname + "/test_crash/",
process.argv[0] + " " + __filename + " X app-success %crash_path%",
process.argv[0] + " " + __filename + " X app-error %error_message%",
);
console.log(process.argv[0] + " " + __filename + " X app-success %crash_path%");
console.log("Setup!");
console.log("Crash!");
crash_handler.crash();
}
export {};