Package es.bsc.dataclay.exceptions
Class DataClayException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- es.bsc.dataclay.exceptions.DataClayException
-
- All Implemented Interfaces:
DataClaySerializable,Serializable
- Direct Known Subclasses:
AccountAlreadyExistException,AccountAlreadyHasADataContractWithProvider,AccountAlreadyRegisteredInContract,AccountHasNoDataContractWithProvider,AccountNotExistException,AccountNotRegisteredInContract,AccountNotResponsibleOfNamespace,AliasAlreadyInUseException,AnnotationDepInfoAlreadyRegisteredException,ClassDepInfoAlreadyRegisteredException,ClassDeploymentException,ClassInIncludesException,ClassNotExistsException,CleanExecutionClassesDirException,ContractNotActiveException,ContractNotExistException,ContractNotPublicException,DataClayRuntimeException,DataContractNotActiveException,DataContractNotExistException,DataContractNotPublicException,DataSetDoesNotExistException,DataSetExistsException,DbHandlerException,DbObjectAlreadyExistException,DbObjectNotExistException,EventListenerAlreadyRegisteredException,EventListenerNotRegisteredException,EventMessageAlreadyStoredException,EventMessageNotRegisteredException,EventObjsMeetConditionAlreadyRegisteredException,ExecuteMethodException,ExecutionEnvironmentAlreadyExistsException,ExecutionEnvironmentNotExistException,ExternalDataClayNotRegisteredException,ImplementationNotExistException,ImportedInterfaceInUseException,InterfaceAlreadyImportedException,InterfaceNotExistsException,InterfaceNotImportedException,InterfaceNotInContractException,InvalidCredentialsException,LanguageExecutionException,MultipleAliasesException,NamespaceDoesNotExistException,NamespaceExistsException,NoMoreImplementationsInOperationException,ObjectAlreadyRegisteredException,ObjectHasReplicas,ObjectNotExistException,ObjectNotRegisteredException,OperationAlreadyInClassException,OperationDepInfoAlreadyRegisteredException,OperationNotExistException,OperationNotInClassException,PropertyAlreadyInClassException,PropertyDepInfoAlreadyRegisteredException,PropertyNotExistException,PropertyNotInClassException,SessionExternalIsNotActiveException,SessionExternalNotExistException,SessionIsNotActiveException,SessionNotExistException,SetterOrGetterOperationsCannotBeRemoved,StorageLocationAlreadyExistsException,StorageLocationNotExistException,TypeDepInfoAlreadyRegisteredException,UnsupportedLanguage
public class DataClayException extends RuntimeException implements DataClaySerializable
This class represents the exceptions produced.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataClayException()Empty constructor used for deserialization.DataClayException(ErrorDefs.ERRORCODE theerrorCode)DataClayException constructorDataClayException(ErrorDefs.ERRORCODE theerrorCode, String theexceptionMessage, boolean verbose)DataClayException constructorDataClayException(Throwable e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.grpc.StatusRuntimeExceptionasGrpcException()Conversion from DataclayException to StatusRuntimeException for GRPCvoiddeserialize(DataClayByteBuffer dcByteBuffer, Map<MetaClassID,byte[]> ifaceBitMaps, DataClayObjectMetaData metadata, Map<Integer,Object> curDeserializedJavaObjs)Deserializes the object from the buffer provided using the interface represented in the bitmap specified.booleanequals(Object candidate)ErrorDefs.ERRORCODEgetErrorcode()Get the DataClayException::errorCodeStringgetLocalizedMessage()inthashCode()voidprintStackTrace()Print stack tracevoidserialize(DataClayByteBuffer dcBuffer, boolean ignoreUserTypes, Map<MetaClassID,byte[]> ifaceBitMaps, IdentityHashMap<Object,Integer> curSerializedObjs, ListIterator<DataClayObject> pendingObjs, ReferenceCounting referenceCounting)Serializes the object into the buffer provided using the interface represented in the bitmap specified.voidsetErrorCode(ErrorDefs.ERRORCODE newerrorCode)Set the DataClayException::errorCodevoidsetExceptionMessage(String newexceptionMessage)Set the DataClayException::exceptionMessage-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
DataClayException
public DataClayException()
Empty constructor used for deserialization.
-
DataClayException
public DataClayException(Throwable e)
-
DataClayException
public DataClayException(ErrorDefs.ERRORCODE theerrorCode)
DataClayException constructor- Parameters:
theerrorCode- The error code
-
DataClayException
public DataClayException(ErrorDefs.ERRORCODE theerrorCode, String theexceptionMessage, boolean verbose)
DataClayException constructor- Parameters:
theerrorCode- The error codetheexceptionMessage- The exception messageverbose- whether to pass cause of the exception or not
-
-
Method Detail
-
asGrpcException
public io.grpc.StatusRuntimeException asGrpcException()
Conversion from DataclayException to StatusRuntimeException for GRPC- Returns:
- the representation of this DataClayException in terms of GRPC
-
getLocalizedMessage
public final String getLocalizedMessage()
- Overrides:
getLocalizedMessagein classThrowable
-
setExceptionMessage
public final void setExceptionMessage(String newexceptionMessage)
Set the DataClayException::exceptionMessage- Parameters:
newexceptionMessage- the exceptionMessage to set
-
getErrorcode
public final ErrorDefs.ERRORCODE getErrorcode()
Get the DataClayException::errorCode- Returns:
- the errorCode
-
setErrorCode
public final void setErrorCode(ErrorDefs.ERRORCODE newerrorCode)
Set the DataClayException::errorCode- Parameters:
newerrorCode- the errorCode to set
-
printStackTrace
public final void printStackTrace()
Print stack trace- Overrides:
printStackTracein classThrowable
-
serialize
public void serialize(DataClayByteBuffer dcBuffer, boolean ignoreUserTypes, Map<MetaClassID,byte[]> ifaceBitMaps, IdentityHashMap<Object,Integer> curSerializedObjs, ListIterator<DataClayObject> pendingObjs, ReferenceCounting referenceCounting)
Description copied from interface:DataClaySerializableSerializes the object into the buffer provided using the interface represented in the bitmap specified.- Specified by:
serializein interfaceDataClaySerializable- Parameters:
dcBuffer- Buffer in which to serialize the objectignoreUserTypes- Indicates if user types found during serialization must be ignored or not (for instance, non recursive make persistent)ifaceBitMaps- Map of bitmaps representing the interfaces to usecurSerializedObjs- Current serialized objects Object -> OID tag. This structure must be different during each serialization since OID tags are not shared.pendingObjs- Pending objs.referenceCounting- Reference counting from this object.
-
deserialize
public void deserialize(DataClayByteBuffer dcByteBuffer, Map<MetaClassID,byte[]> ifaceBitMaps, DataClayObjectMetaData metadata, Map<Integer,Object> curDeserializedJavaObjs)
Description copied from interface:DataClaySerializableDeserializes the object from the buffer provided using the interface represented in the bitmap specified.- Specified by:
deserializein interfaceDataClaySerializable- Parameters:
dcByteBuffer- Buffer from which to deserialize the objectifaceBitMaps- Map of bitmaps representing the interfaces to usemetadata- Useful metadata of the object for executioncurDeserializedJavaObjs- Currently deserialized Java objects
-
-