Skip to content

Commit ec9fa00

Browse files
matmat
authored andcommitted
forgot util project in prior commit
1 parent 5bc1473 commit ec9fa00

5 files changed

Lines changed: 36 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

‎koans/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.sandwich.util.io.ui;
2+
3+
public interface ErrorPresenter {
4+
5+
void displayError(String error);
6+
7+
}

0 commit comments

Comments
 (0)