File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/main/java/cn/rocket/assaignmark/gui Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ public class Controller {
6363 properties .load (in );
6464 toBeLoad = properties .getProperty ("initialPath" );
6565 } catch (IOException e ) {
66- e . printStackTrace ( );
66+ LogManager . getRootLogger (). error ( "Failed to load initial path: " , e );
6767 }
6868 Runtime .getRuntime ().addShutdownHook (new Thread (() -> {
6969 if (openedPath != null ) {
7070 try (FileOutputStream out = new FileOutputStream (propertiesFile )) {
7171 properties .setProperty ("initialPath" , openedPath );
7272 properties .store (out , null );
7373 } catch (IOException e ) {
74- e . printStackTrace ( );
74+ LogManager . getRootLogger (). error ( "Failed to write properties file: " , e );
7575 }
7676 }
7777 }));
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ public void start(Stage primaryStage) {
3939 try {
4040 scene = new Scene (loader .load ());
4141 } catch (IOException e ) {
42- LogManager .getRootLogger ().error ("错误:" + e .getLocalizedMessage ());
43- e .printStackTrace ();
42+ LogManager .getRootLogger ().error ("Failed to load fxml:" ,e );
4443 System .exit (1 );
4544 }
4645 primaryStage .setTitle ("赋分程序" );
You can’t perform that action at this time.
0 commit comments