-
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.
Merge pull request #289 from bcgov/develop/alex-GRAD2-2306
GRAD2-2306, GRAD2-2242
- Loading branch information
Showing
6 changed files
with
106 additions
and
19 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
39 changes: 39 additions & 0 deletions
39
api/src/main/java/ca/bc/gov/educ/api/dataconversion/exception/ServiceException.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,39 @@ | ||
package ca.bc.gov.educ.api.dataconversion.exception; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class ServiceException extends RuntimeException { | ||
|
||
private int statusCode; | ||
|
||
public ServiceException() { | ||
super(); | ||
} | ||
|
||
public ServiceException(String message) { | ||
super(message); | ||
} | ||
|
||
public ServiceException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ServiceException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
protected ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
|
||
public ServiceException(String message, int value) { | ||
super(message); | ||
this.statusCode = value; | ||
} | ||
|
||
public ServiceException(String s, int value, Exception e) { | ||
super(s, e); | ||
this.statusCode = value; | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
api/src/main/java/ca/bc/gov/educ/api/dataconversion/util/Generated.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,15 @@ | ||
package ca.bc.gov.educ.api.dataconversion.util; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
|
||
@Documented | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({TYPE, METHOD}) | ||
public @interface Generated { | ||
} |
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