SMILA (incubation) API documentation

org.eclipse.smila.ipc
Class IpcException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.eclipse.smila.ipc.IpcException
All Implemented Interfaces:
java.io.Serializable

public class IpcException
extends java.lang.Exception

A wrapper class to for exceptions to be transformed to/from JSON error objects.

See Also:
Serialized Form

Constructor Summary
IpcException(java.lang.String message)
          constructur with message.
IpcException(java.lang.String message, java.lang.Throwable cause)
          constructur with mesage and causing exception.
IpcException(java.lang.Throwable cause)
          constructur with causing exception.
 
Method Summary
 void write(IpcStreamWriter writer)
          Writes the JsonException as a JSON object to the given OutputStream.
static void write(IpcStreamWriter writer, java.lang.Throwable ex)
          Writes an Exception as a JSON object to the given OutputStream.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IpcException

public IpcException(java.lang.String message)
constructur with message.

Parameters:
message - detailed error message.

IpcException

public IpcException(java.lang.Throwable cause)
constructur with causing exception.

Parameters:
cause - exception that caused the error.

IpcException

public IpcException(java.lang.String message,
                    java.lang.Throwable cause)
constructur with mesage and causing exception.

Parameters:
message - detailed error message.
cause - exception that caused the error.
Method Detail

write

public void write(IpcStreamWriter writer)
           throws java.io.IOException
Writes the JsonException as a JSON object to the given OutputStream.

Parameters:
writer - the IpcStreamWriter contains an OutputStream to write to
Throws:
java.io.IOException - if any error occusr

write

public static void write(IpcStreamWriter writer,
                         java.lang.Throwable ex)
                  throws java.io.IOException
Writes an Exception as a JSON object to the given OutputStream.

Parameters:
writer - the IpcStreamWriter contains an OutputStream
ex - the exception to write
Throws:
java.io.IOException - if any error occusr

SMILA (incubation) API documentation