Skip to content
Permalink
Browse files
dealing with joda-time-2.5 ArithmeticException
  • Loading branch information
mkristian committed Nov 14, 2014
1 parent b4f75d5 commit ef6182f
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1058,7 +1058,13 @@ public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObjec
nanosecs = nano % 1000000;
}
time.setNSec(nanosecs);
time.dt = time.dt.withMillis(seconds * 1000 + millisecs);
try {
time.dt = time.dt.withMillis(seconds * 1000 + millisecs);
}
// joda-time 2.5 cab throw this exception
catch( ArithmeticException e ) {
throw runtime.newRangeError(e.getMessage());
}
}

time.getMetaClass().getBaseCallSite(RubyClass.CS_IDX_INITIALIZE).call(context, recv, time);

0 comments on commit ef6182f

Please sign in to comment.