Skip to content

Commit 4d12e3a

Browse files
author
Ryan
committed
changed error code to Integer (was string).
1 parent eacd9a5 commit 4d12e3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/org/bson/BSONException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public BSONException( final String msg ) {
3434
* @param errorCode The error code.
3535
* @param msg The error message.
3636
*/
37-
public BSONException( final String errorCode, final String msg ) {
37+
public BSONException( final int errorCode, final String msg ) {
3838
super( msg );
3939
_errorCode = errorCode;
4040
}
@@ -52,7 +52,7 @@ public BSONException( final String msg , final Throwable t ) {
5252
* @param msg The error message.
5353
* @param t The throwable cause.
5454
*/
55-
public BSONException( final String errorCode, final String msg, final Throwable t ) {
55+
public BSONException( final int errorCode, final String msg, final Throwable t ) {
5656
super( msg, t );
5757
_errorCode = errorCode;
5858
}
@@ -61,7 +61,7 @@ public BSONException( final String errorCode, final String msg, final Throwable
6161
* Returns the error code.
6262
* @return The error code.
6363
*/
64-
public String getErrorCode() { return _errorCode; }
64+
public Integer getErrorCode() { return _errorCode; }
6565

6666
/**
6767
* Returns true if the error code is set (i.e., not null).
@@ -70,6 +70,6 @@ public boolean hasErrorCode() {
7070
return (_errorCode != null) ? true : false;
7171
}
7272

73-
private String _errorCode = null;
73+
private Integer _errorCode = null;
7474
}
7575

0 commit comments

Comments
 (0)