-
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.
- Loading branch information
Showing
5 changed files
with
909 additions
and
5 deletions.
There are no files selected for viewing
168 changes: 168 additions & 0 deletions
168
com.io7m.seltzer.io/src/main/java/com/io7m/seltzer/io/SClosedChannelException.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 |
---|---|---|
@@ -0,0 +1,168 @@ | ||
/* | ||
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR | ||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
|
||
package com.io7m.seltzer.io; | ||
|
||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
/** | ||
* A convenient extension of the standard {@link java.nio.channels.ClosedChannelException} class. | ||
*/ | ||
|
||
public class SClosedChannelException extends SIOException | ||
{ | ||
/** | ||
* Construct an exception. | ||
* | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(cause, inErrorCode, inAttributes, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(cause, inErrorCode, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode) | ||
{ | ||
super(message, cause, inErrorCode); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes) | ||
{ | ||
super(message, cause, inErrorCode, inAttributes); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, cause, inErrorCode, inAttributes, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, cause, inErrorCode, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final String message, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, inErrorCode, inAttributes, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param inErrorCode The error code | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SClosedChannelException( | ||
final String message, | ||
final String inErrorCode, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, inErrorCode, inRemediatingAction); | ||
} | ||
} |
168 changes: 168 additions & 0 deletions
168
com.io7m.seltzer.io/src/main/java/com/io7m/seltzer/io/SEOFException.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 |
---|---|---|
@@ -0,0 +1,168 @@ | ||
/* | ||
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR | ||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
|
||
package com.io7m.seltzer.io; | ||
|
||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
/** | ||
* A convenient extension of the standard {@link java.io.EOFException} class. | ||
*/ | ||
|
||
public class SEOFException extends SIOException | ||
{ | ||
/** | ||
* Construct an exception. | ||
* | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SEOFException( | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(cause, inErrorCode, inAttributes, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SEOFException( | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(cause, inErrorCode, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
*/ | ||
|
||
public SEOFException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode) | ||
{ | ||
super(message, cause, inErrorCode); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
*/ | ||
|
||
public SEOFException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes) | ||
{ | ||
super(message, cause, inErrorCode, inAttributes); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SEOFException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, cause, inErrorCode, inAttributes, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param cause The cause | ||
* @param inErrorCode The error code | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SEOFException( | ||
final String message, | ||
final Throwable cause, | ||
final String inErrorCode, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, cause, inErrorCode, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param inErrorCode The error code | ||
* @param inAttributes The attributes | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SEOFException( | ||
final String message, | ||
final String inErrorCode, | ||
final Map<String, String> inAttributes, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, inErrorCode, inAttributes, inRemediatingAction); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param message The message | ||
* @param inErrorCode The error code | ||
* @param inRemediatingAction The remediating action | ||
*/ | ||
|
||
public SEOFException( | ||
final String message, | ||
final String inErrorCode, | ||
final Optional<String> inRemediatingAction) | ||
{ | ||
super(message, inErrorCode, inRemediatingAction); | ||
} | ||
} |
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.