@@ -99,7 +99,6 @@ public static int Main(int argc, IntPtr argvPtr)
99
99
args . Remove ( "--no-plugin" ) ;
100
100
args . Remove ( "--no-3rd-plugin" ) ;
101
101
args . Remove ( "--crash-handler-console" ) ;
102
- args . Remove ( "--no-exception-handlers" ) ;
103
102
104
103
var mainCommand = args [ 1 ] . ToLowerInvariant ( ) ;
105
104
if ( mainCommand . Length > 0 && mainCommand . Length <= 6 && "inject" [ ..mainCommand . Length ] == mainCommand )
@@ -277,6 +276,7 @@ private static DalamudStartInfo ExtractAndInitializeStartInfoFromArguments(Dalam
277
276
var logName = startInfo . LogName ;
278
277
var logPath = startInfo . LogPath ;
279
278
var languageStr = startInfo . Language . ToString ( ) . ToLowerInvariant ( ) ;
279
+ var unhandledExceptionStr = startInfo . UnhandledException . ToString ( ) . ToLowerInvariant ( ) ;
280
280
var troubleshootingData = "{\" empty\" : true, \" description\" : \" No troubleshooting data supplied.\" }" ;
281
281
282
282
for ( var i = 2 ; i < args . Count ; i ++ )
@@ -317,6 +317,10 @@ private static DalamudStartInfo ExtractAndInitializeStartInfoFromArguments(Dalam
317
317
{
318
318
logPath = args [ i ] [ key . Length ..] ;
319
319
}
320
+ else if ( args [ i ] . StartsWith ( key = "--unhandled-exception=" ) )
321
+ {
322
+ unhandledExceptionStr = args [ i ] [ key . Length ..] ;
323
+ }
320
324
else
321
325
{
322
326
continue ;
@@ -416,7 +420,14 @@ private static DalamudStartInfo ExtractAndInitializeStartInfoFromArguments(Dalam
416
420
startInfo . NoLoadThirdPartyPlugins = args . Contains ( "--no-3rd-plugin" ) ;
417
421
// startInfo.BootUnhookDlls = new List<string>() { "kernel32.dll", "ntdll.dll", "user32.dll" };
418
422
startInfo . CrashHandlerShow = args . Contains ( "--crash-handler-console" ) ;
419
- startInfo . NoExceptionHandlers = args . Contains ( "--no-exception-handlers" ) ;
423
+ startInfo . UnhandledException =
424
+ Enum . TryParse < UnhandledExceptionHandlingMode > (
425
+ unhandledExceptionStr ,
426
+ true ,
427
+ out var parsedUnhandledException )
428
+ ? parsedUnhandledException
429
+ : throw new CommandLineException (
430
+ $ "\" { unhandledExceptionStr } \" is not a valid unhandled exception handling mode.") ;
420
431
421
432
return startInfo ;
422
433
}
@@ -458,7 +469,7 @@ private static int ProcessHelpCommand(List<string> args, string? particularComma
458
469
Console . WriteLine ( "Verbose logging:\t [-v]" ) ;
459
470
Console . WriteLine ( "Show Console:\t [--console] [--crash-handler-console]" ) ;
460
471
Console . WriteLine ( "Enable ETW:\t [--etw]" ) ;
461
- Console . WriteLine ( "Enable VEH:\t [--veh], [--veh-full], [--no -exception-handlers ]" ) ;
472
+ Console . WriteLine ( "Enable VEH:\t [--veh], [--veh-full], [--unhandled -exception=default|stalldebug|none ]" ) ;
462
473
Console . WriteLine ( "Show messagebox:\t [--msgbox1], [--msgbox2], [--msgbox3]" ) ;
463
474
Console . WriteLine ( "No plugins:\t [--no-plugin] [--no-3rd-plugin]" ) ;
464
475
Console . WriteLine ( "Logging:\t [--logname=<logfile suffix>] [--logpath=<log base directory>]" ) ;
0 commit comments