Package tech.ytsaurus.core.common
Class YTsaurusError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- tech.ytsaurus.core.common.YTsaurusError
-
- All Implemented Interfaces:
java.io.Serializable
@NonNullApi public class YTsaurusError extends java.lang.RuntimeException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description YTsaurusError(tech.ytsaurus.TError error)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
createFullErrorDescription(tech.ytsaurus.TError error)
YTsaurusError
findMatching(int code)
Deprecated.tech.ytsaurus.TError
findMatchingError(int code)
Returns error of one of the inner error which has specified code.tech.ytsaurus.TError
getError()
java.util.Set<java.lang.Integer>
getErrorCodes()
Get error code of this error and all inner errors.boolean
isUnrecoverable()
static boolean
isUnrecoverable(java.lang.Throwable e)
boolean
matches(int code)
Check if error or one of inner error has specified code.boolean
matches(java.util.function.Predicate<java.lang.Integer> predicate)
Check if error or one of inner error satisfy given predicate.static YTsaurusError
parseFrom(java.util.Map<java.lang.String,tech.ytsaurus.ysontree.YTreeNode> error)
-
-
-
Method Detail
-
parseFrom
public static YTsaurusError parseFrom(java.util.Map<java.lang.String,tech.ytsaurus.ysontree.YTreeNode> error)
-
getError
public tech.ytsaurus.TError getError()
-
matches
public boolean matches(java.util.function.Predicate<java.lang.Integer> predicate)
Check if error or one of inner error satisfy given predicate.
-
matches
public boolean matches(int code)
Check if error or one of inner error has specified code.
-
findMatchingError
@Nullable public tech.ytsaurus.TError findMatchingError(int code)
Returns error of one of the inner error which has specified code. Returns null if no such error is found.
-
getErrorCodes
public java.util.Set<java.lang.Integer> getErrorCodes()
Get error code of this error and all inner errors.
-
findMatching
@Nullable @Deprecated public YTsaurusError findMatching(int code)
Deprecated.Prefer to usefindMatchingError(int)
.
-
isUnrecoverable
public boolean isUnrecoverable()
-
isUnrecoverable
public static boolean isUnrecoverable(java.lang.Throwable e)
-
createFullErrorDescription
public static java.lang.String createFullErrorDescription(tech.ytsaurus.TError error)
-
-