Package javax.media.j3d
Class RenderingError
java.lang.Object
javax.media.j3d.RenderingError
RenderingError is a container object that holds the details of
a runtime error that occurs in the Java 3D rendering system.
- Since:
- Java 3D 1.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates that an error occurred while creating an OpenGL or D3D graphics context.static final int
Indicates that an error occurred while getting the best graphics configuration or while testing whether a given graphics config is supported.static final int
Indicates that no error occurred.static final int
Indicates a error in creating a rendering buffer for an off-screen Canvas3D.static final int
Indicates that an unexpected rendering exception was caught by the Java 3D renderer thread. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new RenderingError object indicating no error.RenderingError
(int errorCode, String errorMessage) Constructs a new RenderingError object with the given error code and message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the canvas associated with this rendering error.Returns the detail message for this rendering error.int
Returns the error code for this rendering error.Returns the error message for this rendering error.Returns the graphics device associated with this rendering error.void
Prints a verbose error report to System.err.void
printVerbose
(PrintStream printStream) Prints a verbose error report to the specified PrintStream.void
setCanvas3D
(Canvas3D canvas) Sets the canvas associated with this rendering error.void
setDetailMessage
(String detailMessage) Sets the detail message for this rendering error.void
setErrorCode
(int errorCode) Sets the error code for this rendering error.void
setErrorMessage
(String errorMessage) Sets the error message for this rendering error.void
setGraphicsDevice
(GraphicsDevice graphicsDevice) Sets the graphics device associated with this rendering error.toString()
Returns a short string that describes this rendering error.
-
Field Details
-
NO_ERROR
public static final int NO_ERRORIndicates that no error occurred.- See Also:
-
UNEXPECTED_RENDERING_ERROR
public static final int UNEXPECTED_RENDERING_ERRORIndicates that an unexpected rendering exception was caught by the Java 3D renderer thread.- See Also:
-
GRAPHICS_CONFIG_ERROR
public static final int GRAPHICS_CONFIG_ERRORIndicates that an error occurred while getting the best graphics configuration or while testing whether a given graphics config is supported.- See Also:
-
CONTEXT_CREATION_ERROR
public static final int CONTEXT_CREATION_ERRORIndicates that an error occurred while creating an OpenGL or D3D graphics context. This can happen either when querying the Canvas3D properties or when rendering.- See Also:
-
OFF_SCREEN_BUFFER_ERROR
public static final int OFF_SCREEN_BUFFER_ERRORIndicates a error in creating a rendering buffer for an off-screen Canvas3D.- See Also:
-
-
Constructor Details
-
RenderingError
public RenderingError()Constructs a new RenderingError object indicating no error. The error code is set toNO_ERROR
. All other fields are initialized to null, including the error message. -
RenderingError
Constructs a new RenderingError object with the given error code and message. All other fields are initialized to null.- Parameters:
errorCode
- the error code for this rendering error.errorMessage
- a short error message describing this rendering error.
-
-
Method Details
-
printVerbose
public void printVerbose()Prints a verbose error report to System.err. This verbose output includes the error code, error message, detail message, and all relevant Java 3D objects. -
printVerbose
Prints a verbose error report to the specified PrintStream. This verbose output includes the error code, error message, detail message, and all relevant Java 3D objects.- Parameters:
printStream
- the print stream on which to print the error report.
-
setErrorCode
public void setErrorCode(int errorCode) Sets the error code for this rendering error. This represents the type of error that occurred.- Parameters:
errorCode
- the error code for this rendering error.
-
getErrorCode
public int getErrorCode()Returns the error code for this rendering error.- Returns:
- the error code.
-
setErrorMessage
Sets the error message for this rendering error. This is a short message describing the error, and is included as part of toString().- Parameters:
errorMessage
- a short error message describing this rendering error.
-
getErrorMessage
Returns the error message for this rendering error.- Returns:
- a short error message describing this rendering error.
-
setDetailMessage
Sets the detail message for this rendering error. This is a more detailed error message that is not included as part of toString().- Parameters:
detailMessage
- a detailed message describing this error in more detail.
-
getDetailMessage
Returns the detail message for this rendering error.- Returns:
- the detail message for this rendering error.
-
setGraphicsDevice
Sets the graphics device associated with this rendering error.- Parameters:
graphicsDevice
- the graphics device associated with this rendering error.
-
getGraphicsDevice
Returns the graphics device associated with this rendering error.- Returns:
- the graphics device associated with this rendering error.
-
setCanvas3D
Sets the canvas associated with this rendering error.- Parameters:
canvas
- the canvas associated with this rendering error.
-
getCanvas3D
Returns the canvas associated with this rendering error.- Returns:
- the canvas associated with this rendering error.
-
toString
Returns a short string that describes this rendering error. The string is composed of the textual description of the errorCode, a ": ", and the errorMessage field. If the errorMessage is null then the ": " and the errorMessage are omitted.
-