Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable Exceptions #810

Merged
merged 1 commit into from
Oct 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/fitnesse/responders/WikiImportingTraverser.java
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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