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>, BinaryWriterBase 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 classPApplicationException._BuilderBase exception thrown on non-declared exceptions on a service call, and other server-side service call issues.static classPApplicationException._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.StringasString()Pure string representation of content.static PApplicationException._Builderbuilder()Make ap_service.PApplicationExceptionbuilder.intcompareTo(PApplicationException other)PExceptionDescriptor<PApplicationException>descriptor()booleanequals(java.lang.Object o)PApplicationExceptionfillInStackTrace()<T> Tget(int key)java.lang.StringgetMessage()Exception message.PApplicationExceptionTypegetType()The application exception type.booleanhas(int key)inthashCode()booleanhasMessage()booleanhasType()PApplicationExceptioninitCause(java.lang.Throwable cause)PApplicationException._Buildermutate()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.StringorigGetLocalizedMessage()Get the original message from the actual exception.java.lang.StringorigGetMessage()Get the original message from the actual exception.static PExceptionDescriptorProvider<PApplicationException>provider()java.lang.StringtoString()intwriteBinary(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:
hasMessagein interfacePApplicationException_OrBuilder- Returns:
- If message is present.
-
getMessage
public java.lang.String getMessage()
Exception message.- Specified by:
getMessagein interfacePApplicationException_OrBuilder- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- The
messagevalue
-
optionalMessage
@Nonnull public java.util.Optional<java.lang.String> optionalMessage()
Exception message.- Specified by:
optionalMessagein interfacePApplicationException_OrBuilder- Returns:
- Optional of the
messagefield value.
-
hasType
public boolean hasType()
- Specified by:
hasTypein interfacePApplicationException_OrBuilder- Returns:
- If type is present.
-
getType
public PApplicationExceptionType getType()
The application exception type.- Specified by:
getTypein interfacePApplicationException_OrBuilder- Returns:
- The
typevalue
-
optionalType
@Nonnull public java.util.Optional<PApplicationExceptionType> optionalType()
The application exception type.- Specified by:
optionalTypein interfacePApplicationException_OrBuilder- Returns:
- Optional of the
typefield value.
-
has
public boolean has(int key)
- Specified by:
hasin interfacePMessageOrBuilder<PApplicationException>- Parameters:
key- The key of the field.- Returns:
- Whether the field is present.
-
get
public <T> T get(int key)
- Specified by:
getin 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:PExceptionGet the original message from the actual exception.- Specified by:
origGetMessagein interfacePException- Returns:
- The original message.
-
origGetLocalizedMessage
public java.lang.String origGetLocalizedMessage()
Description copied from interface:PExceptionGet the original message from the actual exception.- Specified by:
origGetLocalizedMessagein interfacePException- Returns:
- The original message.
-
initCause
public PApplicationException initCause(java.lang.Throwable cause)
- Overrides:
initCausein classjava.lang.Throwable
-
fillInStackTrace
public PApplicationException fillInStackTrace()
- Overrides:
fillInStackTracein classjava.lang.Throwable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
asString
@Nonnull public java.lang.String asString()
Description copied from interface:PMessagePure string representation of content. Does not contain type info.- Specified by:
asStringin interfacePMessage<PApplicationException>- Specified by:
asStringin interfacenet.morimekta.util.Stringable- Returns:
- String representation.
-
compareTo
public int compareTo(PApplicationException other)
- Specified by:
compareToin interfacejava.lang.Comparable<PApplicationException>
-
writeBinary
public int writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer) throws java.io.IOExceptionDescription copied from interface:BinaryWriterWrite 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:
writeBinaryin 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:PMessageGet a builder that extends the current object.- Specified by:
mutatein interfacePMessage<PApplicationException>- Returns:
- The builder instance.
-
provider
@Nonnull public static PExceptionDescriptorProvider<PApplicationException> provider()
-
descriptor
@Nonnull public PExceptionDescriptor<PApplicationException> descriptor()
- Specified by:
descriptorin interfacePMessageOrBuilder<PApplicationException>- Specified by:
descriptorin interfacePValue<PApplicationException>
-
builder
public static PApplicationException._Builder builder()
Make ap_service.PApplicationExceptionbuilder.- Returns:
- The builder instance.
-
-