org.neo4j.server.rest.transactional.error
Class Neo4jError

java.lang.Object
  extended by org.neo4j.server.rest.transactional.error.Neo4jError

public class Neo4jError
extends Object

This is an initial move towards unified errors - it should not live here in the server, but should probably exist in the kernel or similar, where it can be shared across surfaces other than the server.

It's put in place here in order to enforce that the TransactionalService is strictly tied down towards what errors it handles and returns to the client, to create a waterproof abstraction between the runtime-exception landscape that lives below, and the errors we send to the user.

This way, we make it easy to transition this service over to a unified error code based error scheme.


Constructor Summary
Neo4jError(StatusCode statusCode)
           
Neo4jError(StatusCode statusCode, String message)
           
Neo4jError(StatusCode statusCode, String message, Throwable cause)
           
Neo4jError(StatusCode statusCode, Throwable cause)
           
 
Method Summary
 String getMessage()
           
 String getStackTraceAsString()
           
 StatusCode getStatusCode()
           
 boolean shouldSerializeStackTrace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Neo4jError

public Neo4jError(StatusCode statusCode)

Neo4jError

public Neo4jError(StatusCode statusCode,
                  Throwable cause)

Neo4jError

public Neo4jError(StatusCode statusCode,
                  String message)

Neo4jError

public Neo4jError(StatusCode statusCode,
                  String message,
                  Throwable cause)
Method Detail

getStatusCode

public StatusCode getStatusCode()

getMessage

public String getMessage()

shouldSerializeStackTrace

public boolean shouldSerializeStackTrace()

getStackTraceAsString

public String getStackTraceAsString()


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.