Hey, I'm wondering how I'd check for console errors, so that I can store them In a .YML file, therefore I'll be aware of them rather than going through an entire log all the time. Thanks!
Not sure what you mean, But here's what @Skionz means try{ //execute the code }catch(<exception type>){ //catch an exception and write stack-trace to file. }
Catch the exception and handle it with a catch block. https://docs.oracle.com/javase/tutorial/essential/exceptions/catch.html
You may be able to use a PrintStream, calling System.setOut(yourPrintStream) and have it write to the file. I am not completely sure if that would work or if I am making any sense right now.
Or... Code (Text): try { // Code } catch (Exception e) { this.getConfig().set(String, e.getPrintStackTrace()); // I think. I'm not using eclipse for this :P }
Actually you are making sense @BetaNyan but I don't think it would work.try and cahtch will do the trick.