File tree Expand file tree Collapse file tree
lib/util/src/com/sandwich/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ https://github.com/matyb/java-koans/archives/master
1111 * * lib/koans-tests* : the directory for tests to check the sanity of the application
1212 * * lib/file-compiler* : the dynamic compiler module that loads newly saved java files into the JVM as classes
1313 * * lib/file-monitor* : the file monitoring module for notifying the app when files are saved
14+ * * lib/util* : application agnostic interfaces and utilities shared in projects
1415* Change directory to the koans directory: ``` cd koans ```
1516* If you are using windows enter: ``` run.bat ``` or ``` sh run.sh ``` if you are using Mac or Linux.
1617
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ https://github.com/matyb/java-koans/archives/master
1111 * * lib/koans-tests* : the directory for tests to check the sanity of the application
1212 * * lib/file-compiler* : the dynamic compiler module that loads newly saved java files into the JVM as classes
1313 * * lib/file-monitor* : the file monitoring module for notifying the app when files are saved
14+ * * lib/util* : application agnostic interfaces and utilities shared in projects
1415* Change directory to the koans directory: ``` cd koans ```
1516* If you are using windows enter: ``` run.bat ``` or ``` sh run.sh ``` if you are using Mac or Linux.
1617
Original file line number Diff line number Diff line change 1+ package com .sandwich .util ;
2+
3+ import java .io .PrintWriter ;
4+ import java .io .StringWriter ;
5+
6+ public class ExceptionUtils {
7+
8+ public static String convertToPopulatedStackTraceString (Throwable t ) {
9+ StringWriter stringWriter = new StringWriter ();
10+ if (t == null ){
11+ return "" ;
12+ }
13+ t .printStackTrace (new PrintWriter (stringWriter ));
14+ return stringWriter .toString ();
15+ }
16+
17+ }
Original file line number Diff line number Diff line change 1+ package com .sandwich .util .io .ui ;
2+
3+ public class DefaultErrorPresenter implements ErrorPresenter {
4+
5+ @ Override
6+ public void displayError (String error ) {
7+ System .err .println (error );
8+ }
9+
10+ }
Original file line number Diff line number Diff line change 1+ package com .sandwich .util .io .ui ;
2+
3+ public interface ErrorPresenter {
4+
5+ void displayError (String error );
6+
7+ }
You can’t perform that action at this time.
0 commit comments