public static object ToType(object value, Type desiredType) { try { return JsToJava(value, desiredType); } catch (EvaluatorException ex) { ArgumentException ex2 = new ArgumentException(ex.Message); Kit.InitCause(ex2, ex); throw ex2; } }