Skip to content

Commit

Permalink
Merge pull request #810 from hansjoachim/exceptions
Browse files Browse the repository at this point in the history
Immutable Exceptions
  • Loading branch information
amolenaar committed Oct 4, 2015
2 parents 52d5794 + d4e7d55 commit 2ad5c0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/fitnesse/responders/WikiImportingTraverser.java
Expand Up @@ -89,9 +89,9 @@ public void pageImportError(WikiPage localPage, Exception e) {
}

public static class ImportError {
private String message;
private String type;
private Exception exception;
private final String message;
private final String type;
private final Exception exception;

public ImportError(String type, String message) {
this(type, message, null);
Expand Down
18 changes: 8 additions & 10 deletions src/fitnesse/slim/SlimException.java
Expand Up @@ -3,16 +3,16 @@
public class SlimException extends Exception {
private static final String PRETTY_PRINT_TAG_START = "message:<<";
private static final String PRETTY_PRINT_TAG_END = ">>";
private String tag;
private boolean prettyPrint;

private final String tag;
private final boolean prettyPrint;

public SlimException(String message) {
this(message, false);
this(message, "", false);
}

public SlimException(String message, boolean prettyPrint) {
super(message);
this.prettyPrint = prettyPrint;
this(message, "", prettyPrint);
}

public SlimException(String message, String tag) {
Expand All @@ -26,12 +26,11 @@ public SlimException(String message, String tag, boolean prettyPrint) {
}

public SlimException(Throwable cause) {
this(cause, false);
this(cause, "", false);
}

public SlimException(Throwable cause, boolean prettyPrint) {
super(cause);
this.prettyPrint = prettyPrint;
this(cause, "", prettyPrint);
}

public SlimException(Throwable cause, String tag) {
Expand All @@ -49,8 +48,7 @@ public SlimException(String message, Throwable cause) {
}

public SlimException(String message, Throwable cause, boolean prettyPrint) {
super(message, cause);
this.prettyPrint = prettyPrint;
this(message, cause, "", prettyPrint);
}

public SlimException(String message, Throwable cause, String tag) {
Expand Down

0 comments on commit 2ad5c0e

Please sign in to comment.