-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
{ | ||
return json_decode(file_get_contents(__DIR__ . "/../../tools/HttpExceptions/HttpCodes.json")); | ||
return json_decode(file_get_contents(__DIR__ . "/../../tools/HttpExceptions/HttpCodes.json"), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still using json instead of php to store the data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is just an example so I wouldn't worry too much about it 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
youre also using this json in other places, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for generator stuff nothing else
@@ -359,20 +359,20 @@ public static function run(EmitterInterface $emitter = null): void | |||
} | |||
|
|||
if ($resolved === null) { | |||
if (!self::$emitHttpExceptions) { | |||
if (!is_subclass_of($e, HttpException::class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is jank, just catch HttpExceptions seperately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean just have Catchers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try {
// ...
} catch (HttpException $e) {
// ...
} catch (Exception $e) {
// ...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOU CAN DO THAT!?!? I've been lied to my entire life
No description provided.