@@ -33,6 +33,7 @@ License, or (at your option) any later version.
3333import tools .DatabaseConnection ;
3434import tools .MapleLogger ;
3535import tools .MaplePacketCreator ;
36+ import tools .Output ;
3637import tools .Pair ;
3738import client .MapleCharacter ;
3839import client .MapleClient ;
@@ -448,11 +449,20 @@ public static boolean execute(MapleClient c, String[] sub, char heading) {
448449 chr .message (" check - one argument, ticker, checks value of a stock" );
449450 chr .message (" portfolio - no arguments, checks your portfolio" );
450451 }
451- } catch (Exception e ) {
452+ } catch (NumberFormatException e ) {
453+ chr .message ("Something went wrong! :(" );
454+ chr .message ("Usage: " );
455+ chr .message (" @stocks [option] [arguments]" );
456+ chr .message ("Type '@stocks help' to see the options." );
457+ } catch (IndexOutOfBoundsException e ) {
452458 chr .message ("Something went wrong! :(" );
453459 chr .message ("Usage: " );
454460 chr .message (" @stocks [option] [arguments]" );
455461 chr .message ("Type '@stocks help' to see the options." );
462+ } catch (Exception e ) {
463+ chr .message ("We apologize! Something went seriously wrong! D:" );
464+ Output .print ("MapleStocks experienced an error with " + chr .getName () + "." );
465+ MapleLogger .print (MapleLogger .EXCEPTION_CAUGHT , e );
456466 }
457467 } else if (!ServerConstants .USE_MAPLE_STOCKS ) {
458468 chr .message ("MapleStocks is disabled by the server." );
0 commit comments