getCode(). * This can be compared against the `SIMDJSON_ERR_*` constants. * * Before simdjson 2.1.0, a regular RuntimeException with an error code of 0 was thrown. */ class SimdJsonException extends RuntimeException {} /** * Thrown for error conditions on fields such as $depth that are not expected to be * from user-provided JSON, with similar behavior to php 8.0. * * NOTE: https://www.php.net/valueerror was added in php 8.0. * In older php versions, this extends Error instead. * * When support for php 8.0 is dropped completely, * a major release of simdjson will likely switch to a standard ValueError. */ class SimdJsonValueError extends ValueError {}