Skip to content

Commit

Permalink
Added DASSdkInvalidArgumentException + handle it in Table gRPC operat…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
bgaidioz committed Feb 26, 2025
1 parent a43bbde commit fb4ba19
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 194 deletions.
27 changes: 0 additions & 27 deletions src/main/java/com/rawlabs/das/sdk/DASException.java

This file was deleted.

23 changes: 0 additions & 23 deletions src/main/java/com/rawlabs/das/sdk/DASSdkException.java

This file was deleted.

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;

/**
* DASSdkInvalidArgumentException is thrown by DAS SDK methods when an invalid argument error is to be reported
* to a user (e.g. string too long during an INSERT, missing mandatory predicate, etc.).
*/
public class DASSdkInvalidArgumentException extends RuntimeException {
public DASSdkInvalidArgumentException(String message) {
super(message);
}

public DASSdkInvalidArgumentException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

package com.rawlabs.das.sdk;

public class DASSdkUnsupportedException extends DASSdkException {
public class DASSdkUnsupportedException extends RuntimeException {
public DASSdkUnsupportedException() {
super("unsupported operation");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rawlabs/das/sdk/DASSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class DASSettings {
private final Config config;

/** Exception representing a settings configuration problem. */
public static class SettingsException extends DASException {
public static class SettingsException extends RuntimeException {
public SettingsException(String message, Throwable cause) {
super(message, cause);
}
Expand Down
Loading

0 comments on commit fb4ba19

Please sign in to comment.