-
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.
substantially improve exception handling and documentation for services
- Loading branch information
Showing
15 changed files
with
138 additions
and
65 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
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
31 changes: 0 additions & 31 deletions
31
service-course-api/src/main/java/servicecourse/services/Errors.java
This file was deleted.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
...-api/src/main/java/servicecourse/services/exceptions/BikeBrandAlreadyExistsException.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,7 @@ | ||
package servicecourse.services.exceptions; | ||
|
||
public class BikeBrandAlreadyExistsException extends IllegalArgumentException { | ||
public BikeBrandAlreadyExistsException(String brandName) { | ||
super("Bike brand with name '" + brandName + "' already exists"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ourse-api/src/main/java/servicecourse/services/exceptions/BikeBrandNotFoundException.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,9 @@ | ||
package servicecourse.services.exceptions; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
public class BikeBrandNotFoundException extends NoSuchElementException { | ||
public BikeBrandNotFoundException(String brandName) { | ||
super("Bike brand with name '" + brandName + "' not found"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ice-course-api/src/main/java/servicecourse/services/exceptions/BikeNotFoundException.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,9 @@ | ||
package servicecourse.services.exceptions; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
public class BikeNotFoundException extends NoSuchElementException { | ||
public BikeNotFoundException(String bikeId) { | ||
super(("Bike with ID '" + bikeId + "' not found")); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...-api/src/main/java/servicecourse/services/exceptions/EmptyStringFilterInputException.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,8 @@ | ||
package servicecourse.services.exceptions; | ||
|
||
public class EmptyStringFilterInputException extends IllegalArgumentException { | ||
public EmptyStringFilterInputException(String fieldPath) { | ||
super("No fields specified on the StringFilterInput for path '" + fieldPath | ||
+ "', please specify at least one"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...course-api/src/main/java/servicecourse/services/exceptions/GroupsetNotFoundException.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,9 @@ | ||
package servicecourse.services.exceptions; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
public class GroupsetNotFoundException extends NoSuchElementException { | ||
public GroupsetNotFoundException(String groupsetName) { | ||
super("Groupset with name '" + groupsetName + "' not found"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ce-course-api/src/main/java/servicecourse/services/exceptions/ModelNotFoundException.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,9 @@ | ||
package servicecourse.services.exceptions; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
public class ModelNotFoundException extends NoSuchElementException { | ||
public ModelNotFoundException(String modelId) { | ||
super("Model with ID '" + modelId + "' not found"); | ||
} | ||
} |
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