in src/Framework/HackTest.hack [295:311]
public static function computeExpectedExceptionCode(
mixed $exception_code,
): ?int {
if ($exception_code is int) {
return $exception_code;
}
if (!($exception_code is string)) {
return null;
}
$int = Str\to_int($exception_code);
if ($int !== null) {
return $int;
}
// can't handle arbitrary enums for open source
return null;
}