Skip to content

Commit

Permalink
forgot util project in prior commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mat authored and mat committed Oct 15, 2012
1 parent 5bc1473 commit ec9fa00
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ https://github.com/matyb/java-koans/archives/master
* *lib/koans-tests*: the directory for tests to check the sanity of the application
* *lib/file-compiler*: the dynamic compiler module that loads newly saved java files into the JVM as classes
* *lib/file-monitor*: the file monitoring module for notifying the app when files are saved
* *lib/util*: application agnostic interfaces and utilities shared in projects
* Change directory to the koans directory: ```cd koans```
* If you are using windows enter: ```run.bat``` or ```sh run.sh``` if you are using Mac or Linux.

Expand Down
1 change: 1 addition & 0 deletions koans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ https://github.com/matyb/java-koans/archives/master
* *lib/koans-tests*: the directory for tests to check the sanity of the application
* *lib/file-compiler*: the dynamic compiler module that loads newly saved java files into the JVM as classes
* *lib/file-monitor*: the file monitoring module for notifying the app when files are saved
* *lib/util*: application agnostic interfaces and utilities shared in projects
* Change directory to the koans directory: ```cd koans```
* If you are using windows enter: ```run.bat``` or ```sh run.sh``` if you are using Mac or Linux.

Expand Down
17 changes: 17 additions & 0 deletions lib/util/src/com/sandwich/util/ExceptionUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.sandwich.util;

import java.io.PrintWriter;
import java.io.StringWriter;

public class ExceptionUtils {

public static String convertToPopulatedStackTraceString(Throwable t) {
StringWriter stringWriter = new StringWriter();
if(t == null){
return "";
}
t.printStackTrace(new PrintWriter(stringWriter));
return stringWriter.toString();
}

}
10 changes: 10 additions & 0 deletions lib/util/src/com/sandwich/util/io/ui/DefaultErrorPresenter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.sandwich.util.io.ui;

public class DefaultErrorPresenter implements ErrorPresenter {

@Override
public void displayError(String error) {
System.err.println(error);
}

}
7 changes: 7 additions & 0 deletions lib/util/src/com/sandwich/util/io/ui/ErrorPresenter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.sandwich.util.io.ui;

public interface ErrorPresenter {

void displayError(String error);

}

0 comments on commit ec9fa00

Please sign in to comment.