forked from bennidi/mbassador
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set an ignore comment on the failing testcase. Ran PMD on the code to…
… clean up some unused modifiers.
- Loading branch information
Showing
39 changed files
with
460 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# idea project settings # | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/* | ||
.idea | ||
|
||
# Package Files # | ||
*.war | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 25 additions & 13 deletions
38
src/main/java/net/engio/mbassy/IPublicationErrorHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,44 @@ | ||
package net.engio.mbassy; | ||
|
||
/** | ||
* Publication error handlers are provided with a publication error every time an error occurs during message publication. | ||
* A handler might fail with an exception, not be accessible because of the presence of a security manager | ||
* or other reasons might lead to failures during the message publication process. | ||
* | ||
* Publication error handlers are provided with a publication error every time an | ||
* error occurs during message publication. | ||
* A handler might fail with an exception, not be accessible because of the presence | ||
* of a security manager or other reasons might lead to failures during the message publication process. | ||
* <p/> | ||
* | ||
* @author bennidi | ||
* Date: 2/22/12 | ||
* Date: 2/22/12 | ||
*/ | ||
@SuppressWarnings("PMD.UnusedModifier") | ||
public interface IPublicationErrorHandler { | ||
|
||
/** | ||
* Handle the given publication error. | ||
* | ||
* @param error | ||
* @param error The PublicationError to handle. | ||
*/ | ||
public void handleError(PublicationError error); | ||
void handleError(PublicationError error); | ||
|
||
// This is the default error handler it will simply log to standard out and | ||
// print stack trace if available | ||
/** | ||
* The default error handler will simply log to standard out and | ||
* print the stack trace if available. | ||
*/ | ||
static final class ConsoleLogger implements IPublicationErrorHandler { | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public void handleError(PublicationError error) { | ||
public void handleError(final PublicationError error) { | ||
|
||
// Printout the error itself | ||
System.out.println(error); | ||
if (error.getCause() != null) error.getCause().printStackTrace(); | ||
|
||
// Printout the stacktrace from the cause. | ||
if (error.getCause() != null) { | ||
error.getCause().printStackTrace(); | ||
} | ||
} | ||
} | ||
|
||
; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.