public class

BSONException

extends RuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.bson.BSONException

Class Overview

A general runtime exception raised in BSON processing.

Summary

Public Constructors
BSONException(String msg)
BSONException(int errorCode, String msg)
BSONException(String msg, Throwable t)
BSONException(int errorCode, String msg, Throwable t)
Public Methods
Integer getErrorCode()
Returns the error code.
boolean hasErrorCode()
Returns true if the error code is set (i.e., not null).
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public BSONException (String msg)

Parameters
msg The error message.

public BSONException (int errorCode, String msg)

Parameters
errorCode The error code.
msg The error message.

public BSONException (String msg, Throwable t)

Parameters
msg The error message.
t The throwable cause.

public BSONException (int errorCode, String msg, Throwable t)

Parameters
errorCode The error code.
msg The error message.
t The throwable cause.

Public Methods

public Integer getErrorCode ()

Returns the error code.

Returns
  • The error code.

public boolean hasErrorCode ()

Returns true if the error code is set (i.e., not null).