case error::not_exact: return "not exact";
case error::test_failure: return "test failure";
+
+case error::missing_slash: return "missing slash character";
+case error::invalid_escape: return "invalid escape sequence";
+case error::token_not_number: return "token is not a number";
+case error::value_is_scalar: return "current value is scalar";
+case error::not_found: return "no referenced value";
+case error::token_overflow: return "token overflow";
+case error::past_the_end: return "past-the-end token not supported";
}
}
case error::not_number:
case error::not_exact:
return condition::assign_error;
+
+case error::missing_slash:
+case error::invalid_escape:
+ return condition::pointer_parse_error;
+
+case error::token_not_number:
+case error::value_is_scalar:
+case error::not_found:
+case error::token_overflow:
+case error::past_the_end:
+ return condition::pointer_use_error;
}
}
};
-
- static codes const cat{};
+ // on some versions of msvc-14.2 the category is put in RO memory
+ // erroneusly, if the category object is const,
+ // and that may result in crash
+ static codes cat{};
return error_code{static_cast<
std::underlying_type<error>::type>(e), cat};
}
return "A JSON parse error occurred";
case condition::assign_error:
return "An error occurred during assignment";
+ case condition::pointer_parse_error:
+ return "A JSON Pointer parse error occurred";
+ case condition::pointer_use_error:
+ return "An error occurred when JSON Pointer was used with"
+ " a value";
}
}
};
- static codes const cat{};
+ // on some versions of msvc-14.2 the category is put in RO memory
+ // erroneusly, if the category object is const,
+ // and that may result in crash
+ static codes cat{};
return error_condition{static_cast<
std::underlying_type<condition>::type>(c), cat};
}