Skip to content

Commit 484ccd1

Browse files
authored
Deprecate CheckedServiceException constructors (#1401)
Deprecate `CheckedServiceException` constructors
1 parent 4204251 commit 484ccd1

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: deprecation
2+
deprecation:
3+
description: Deprecate `CheckedServiceException`
4+
links:
5+
- https://github.com/palantir/conjure-java-runtime-api/pull/1401

errors/src/main/java/com/palantir/conjure/java/api/errors/CheckedServiceException.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,20 @@ public abstract class CheckedServiceException extends Exception implements SafeL
3535
/**
3636
* Creates a new exception for the given error. All {@link com.palantir.logsafe.Arg parameters} are propagated to
3737
* clients.
38+
* <p>
39+
* @deprecated Do not extend this class, it will be removed in a future version.
3840
*/
41+
@Deprecated(forRemoval = true)
3942
public CheckedServiceException(ErrorType errorType, Arg<?>... parameters) {
4043
this(errorType, null, parameters);
4144
}
4245

43-
/** As above, but additionally records the cause of this exception. */
46+
/**
47+
* As above, but additionally records the cause of this exception.
48+
* <p>
49+
* @deprecated Do not extend this class, it will be removed in a future version.
50+
*/
51+
@Deprecated(forRemoval = true)
4452
public CheckedServiceException(ErrorType errorType, @Nullable Throwable cause, Arg<?>... args) {
4553
super(cause);
4654
this.errorInstanceId = ServiceExceptionUtils.generateErrorInstanceId(cause);

0 commit comments

Comments
 (0)