Package net.morimekta.providence
Class PApplicationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- net.morimekta.providence.PApplicationException
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PApplicationException>
,PApplicationException_OrBuilder
,PException
,PMessage<PApplicationException>
,PMessageOrBuilder<PApplicationException>
,PValue<PApplicationException>
,BinaryWriter
,net.morimekta.util.Stringable
@Generated(value="net.morimekta.providence:providence-generator-java", comments="java:serializable") @Immutable public class PApplicationException extends java.io.IOException implements PApplicationException_OrBuilder, PMessage<PApplicationException>, PException, java.lang.Comparable<PApplicationException>, BinaryWriter
Base exception thrown on non-declared exceptions on a service call, and other server-side service call issues.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PApplicationException._Builder
Base exception thrown on non-declared exceptions on a service call, and other server-side service call issues.static class
PApplicationException._Field
-
Field Summary
Fields Modifier and Type Field Description static PExceptionDescriptor<PApplicationException>
kDescriptor
-
Constructor Summary
Constructors Constructor Description PApplicationException(java.lang.String pMessage, PApplicationExceptionType pType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asString()
Pure string representation of content.static PApplicationException._Builder
builder()
Make ap_service.PApplicationException
builder.int
compareTo(PApplicationException other)
PExceptionDescriptor<PApplicationException>
descriptor()
boolean
equals(java.lang.Object o)
PApplicationException
fillInStackTrace()
<T> T
get(int key)
java.lang.String
getMessage()
Exception message.PApplicationExceptionType
getType()
The application exception type.boolean
has(int key)
int
hashCode()
boolean
hasMessage()
boolean
hasType()
PApplicationException
initCause(java.lang.Throwable cause)
PApplicationException._Builder
mutate()
Get a builder that extends the current object.java.util.Optional<java.lang.String>
optionalMessage()
Exception message.java.util.Optional<PApplicationExceptionType>
optionalType()
The application exception type.java.lang.String
origGetLocalizedMessage()
Get the original message from the actual exception.java.lang.String
origGetMessage()
Get the original message from the actual exception.static PExceptionDescriptorProvider<PApplicationException>
provider()
java.lang.String
toString()
int
writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer)
Write the current message to the binary writer.-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.PMessageOrBuilder
toBuilder, toMessage
-
-
-
-
Field Detail
-
kDescriptor
public static final PExceptionDescriptor<PApplicationException> kDescriptor
-
-
Constructor Detail
-
PApplicationException
public PApplicationException(java.lang.String pMessage, PApplicationExceptionType pType)
-
-
Method Detail
-
hasMessage
public boolean hasMessage()
- Specified by:
hasMessage
in interfacePApplicationException_OrBuilder
- Returns:
- If message is present.
-
getMessage
public java.lang.String getMessage()
Exception message.- Specified by:
getMessage
in interfacePApplicationException_OrBuilder
- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- The
message
value
-
optionalMessage
@Nonnull public java.util.Optional<java.lang.String> optionalMessage()
Exception message.- Specified by:
optionalMessage
in interfacePApplicationException_OrBuilder
- Returns:
- Optional of the
message
field value.
-
hasType
public boolean hasType()
- Specified by:
hasType
in interfacePApplicationException_OrBuilder
- Returns:
- If type is present.
-
getType
public PApplicationExceptionType getType()
The application exception type.- Specified by:
getType
in interfacePApplicationException_OrBuilder
- Returns:
- The
type
value
-
optionalType
@Nonnull public java.util.Optional<PApplicationExceptionType> optionalType()
The application exception type.- Specified by:
optionalType
in interfacePApplicationException_OrBuilder
- Returns:
- Optional of the
type
field value.
-
has
public boolean has(int key)
- Specified by:
has
in interfacePMessageOrBuilder<PApplicationException>
- Parameters:
key
- The key of the field.- Returns:
- Whether the field is present.
-
get
public <T> T get(int key)
- Specified by:
get
in interfacePMessageOrBuilder<PApplicationException>
- Type Parameters:
T
- The return type.- Parameters:
key
- The key of the field.- Returns:
- The value of the field.
-
origGetMessage
public java.lang.String origGetMessage()
Description copied from interface:PException
Get the original message from the actual exception.- Specified by:
origGetMessage
in interfacePException
- Returns:
- The original message.
-
origGetLocalizedMessage
public java.lang.String origGetLocalizedMessage()
Description copied from interface:PException
Get the original message from the actual exception.- Specified by:
origGetLocalizedMessage
in interfacePException
- Returns:
- The original message.
-
initCause
public PApplicationException initCause(java.lang.Throwable cause)
- Overrides:
initCause
in classjava.lang.Throwable
-
fillInStackTrace
public PApplicationException fillInStackTrace()
- Overrides:
fillInStackTrace
in classjava.lang.Throwable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Throwable
-
asString
@Nonnull public java.lang.String asString()
Description copied from interface:PMessage
Pure string representation of content. Does not contain type info.- Specified by:
asString
in interfacePMessage<PApplicationException>
- Specified by:
asString
in interfacenet.morimekta.util.Stringable
- Returns:
- String representation.
-
compareTo
public int compareTo(PApplicationException other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<PApplicationException>
-
writeBinary
public int writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer) throws java.io.IOException
Description copied from interface:BinaryWriter
Write the current message to the binary writer. NOTE: This method is not intended to be used directly. Instead use theBinarySerializer.serialize(OutputStream, PMessageOrBuilder)
call.- Specified by:
writeBinary
in interfaceBinaryWriter
- Parameters:
writer
- The binary writer to write to.- Returns:
- The number of bytes written.
- Throws:
java.io.IOException
- If it failed to write the message for any reason.
-
mutate
@Nonnull public PApplicationException._Builder mutate()
Description copied from interface:PMessage
Get a builder that extends the current object.- Specified by:
mutate
in interfacePMessage<PApplicationException>
- Returns:
- The builder instance.
-
provider
@Nonnull public static PExceptionDescriptorProvider<PApplicationException> provider()
-
descriptor
@Nonnull public PExceptionDescriptor<PApplicationException> descriptor()
- Specified by:
descriptor
in interfacePMessageOrBuilder<PApplicationException>
- Specified by:
descriptor
in interfacePValue<PApplicationException>
-
builder
public static PApplicationException._Builder builder()
Make ap_service.PApplicationException
builder.- Returns:
- The builder instance.
-
-