Skip to content

Commit 64c8ce7

Browse files
committed
throw nicer exception if invalid list
1 parent f150c31 commit 64c8ce7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/com/mongodb/BasicDBList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ int _getInt( String s ){
107107
return Integer.parseInt( s );
108108
}
109109
catch ( Exception e ){
110-
return -1;
110+
throw new IllegalArgumentException( "BasicDBList can only work with numeric keys, not: [" + s + "]" );
111111
}
112112
}
113113

0 commit comments

Comments
 (0)