Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Affects: #2
- Loading branch information
Showing
14 changed files
with
714 additions
and
30 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
87 changes: 87 additions & 0 deletions
87
com.io7m.blackthorne.api/src/main/java/com/io7m/blackthorne/api/BTException.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,87 @@ | ||
/* | ||
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://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.blackthorne.api; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
/** | ||
* An exception raised by convenience methods. | ||
*/ | ||
|
||
public final class BTException extends Exception | ||
{ | ||
private final List<BTParseError> errors; | ||
|
||
/** | ||
* @return The parse errors encountered during parsing | ||
*/ | ||
|
||
public List<BTParseError> errors() | ||
{ | ||
return this.errors; | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param inMessage The exception message | ||
* @param inErrors The parse errors | ||
*/ | ||
|
||
public BTException( | ||
final String inMessage, | ||
final List<BTParseError> inErrors) | ||
{ | ||
super(Objects.requireNonNull(inMessage, "message")); | ||
this.errors = Objects.requireNonNull(inErrors, "errors"); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param inMessage The exception message | ||
* @param inCause The cause | ||
* @param inErrors The parse errors | ||
*/ | ||
|
||
public BTException( | ||
final String inMessage, | ||
final Throwable inCause, | ||
final List<BTParseError> inErrors) | ||
{ | ||
super( | ||
Objects.requireNonNull(inMessage, "message"), | ||
Objects.requireNonNull(inCause, "cause")); | ||
this.errors = Objects.requireNonNull(inErrors, "errors"); | ||
} | ||
|
||
/** | ||
* Construct an exception. | ||
* | ||
* @param inCause The cause | ||
* @param inErrors The parse errors | ||
*/ | ||
|
||
public BTException( | ||
final Throwable inCause, | ||
final List<BTParseError> inErrors) | ||
{ | ||
super(Objects.requireNonNull(inCause, "cause")); | ||
this.errors = Objects.requireNonNull(inErrors, "errors"); | ||
} | ||
} |
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
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
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
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,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>com.io7m.blackthorne</artifactId> | ||
<groupId>com.io7m.blackthorne</groupId> | ||
<version>0.0.6-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>com.io7m.blackthorne.jxe</artifactId> | ||
|
||
<name>com.io7m.blackthorne.jxe</name> | ||
<description>Typed XML stream processing (JXE integration)</description> | ||
<url>http://github.com/io7m/blackthorne</url> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>com.io7m.blackthorne.api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.io7m.jxe</groupId> | ||
<artifactId>com.io7m.jxe.core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.annotation.bundle</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.annotation.versioning</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.