-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add (and process at the top) SDK specific exceptions to distinguish e…
…rrors
- Loading branch information
Showing
5 changed files
with
102 additions
and
18 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/main/java/com/rawlabs/das/sdk/DASSdkPermissionDeniedException.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,27 @@ | ||
/* | ||
* Copyright 2024 RAW Labs S.A. | ||
* | ||
* Use of this software is governed by the Business Source License | ||
* included in the file licenses/BSL.txt. | ||
* | ||
* As of the Change Date specified in that file, in accordance with | ||
* the Business Source License, use of this software will be governed | ||
* by the Apache License, Version 2.0, included in the file | ||
* licenses/APL.txt. | ||
*/ | ||
|
||
package com.rawlabs.das.sdk; | ||
|
||
/** | ||
* DASSdkPermissionDeniedException is thrown by DAS SDK methods when a permission denied error is to | ||
* be reported to a user (e.g. missing required permissions, etc.). | ||
*/ | ||
public class DASSdkPermissionDeniedException extends RuntimeException { | ||
public DASSdkPermissionDeniedException(String message) { | ||
super(message); | ||
} | ||
|
||
public DASSdkPermissionDeniedException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/rawlabs/das/sdk/DASSdkUnauthenticatedException.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,27 @@ | ||
/* | ||
* Copyright 2024 RAW Labs S.A. | ||
* | ||
* Use of this software is governed by the Business Source License | ||
* included in the file licenses/BSL.txt. | ||
* | ||
* As of the Change Date specified in that file, in accordance with | ||
* the Business Source License, use of this software will be governed | ||
* by the Apache License, Version 2.0, included in the file | ||
* licenses/APL.txt. | ||
*/ | ||
|
||
package com.rawlabs.das.sdk; | ||
|
||
/** | ||
* DASSdkUnauthenticatedException is thrown by DAS SDK methods when an unauthenticated error is to | ||
* be reported to a user (e.g. missing authentication token, invalid credentials, etc.). | ||
*/ | ||
public class DASSdkUnauthenticatedException extends RuntimeException { | ||
public DASSdkUnauthenticatedException(String message) { | ||
super(message); | ||
} | ||
|
||
public DASSdkUnauthenticatedException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
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