-
Notifications
You must be signed in to change notification settings - Fork 190
Adjust parent types for exceptions #1924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
54d109f
10e7183
53550fe
ef60d6a
c2b41cf
2a7a255
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright © 2018 Apple Inc. and the ServiceTalk project authors | ||
* Copyright © 2018, 2021 Apple Inc. and the ServiceTalk project authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -40,8 +40,8 @@ public final class RepeatStrategies { | |
/** | ||
* An {@link Exception} instance used to indicate termination of repeats. | ||
*/ | ||
public static final class TerminateRepeatException extends Exception { | ||
private static final long serialVersionUID = -1725458427890873886L; | ||
public static final class TerminateRepeatException extends RuntimeException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The decision to throw this exception happens at runtime |
||
private static final long serialVersionUID = -1725458427890873887L; | ||
|
||
// It is fine to reuse this instance and let it escape to the user as enableSuppression is set to false. | ||
static final TerminateRepeatException INSTANCE = new TerminateRepeatException(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,18 @@ | |
*/ | ||
package io.servicetalk.grpc.api; | ||
|
||
import io.servicetalk.serializer.api.SerializationException; | ||
|
||
/** | ||
* Exception thrown when a message was encoded with an unsupported encoder. | ||
* | ||
* @deprecated This exception type was thrown only by {@code ProtoBufSerializationProviderBuilder} that was deprecated | ||
* and will be removed in future releases. Use {@link SerializationException} instead that can be thrown by a new | ||
* implementation. | ||
*/ | ||
@Deprecated | ||
public final class MessageEncodingException extends RuntimeException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
private static final long serialVersionUID = 4146293629657567572L; | ||
|
||
private final String encoding; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,9 @@ | |
*/ | ||
package io.servicetalk.http.api; | ||
|
||
import io.servicetalk.serializer.api.SerializationException; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
final class UnsupportedHttpChunkException extends SerializationException { | ||
final class UnsupportedHttpChunkException extends IllegalArgumentException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change from |
||
private static final long serialVersionUID = -4336685587984151152L; | ||
|
||
UnsupportedHttpChunkException(@Nullable Object o) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debated between
ConnectException
andSocketException
. Based on their javadoc, decided to go withSocketException
because technically the connection was already established, but there was a problem "accessing" it due to a selector or a host becoming unavailable.