leocavalcante / siler

⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions.
https://siler.leocavalcante.dev
MIT License
1.12k stars 90 forks source link

How to throw an Exception in the resolver? #876

Closed geri777 closed 2 years ago

geri777 commented 2 years ago

When I throw an exception in the resolver the code execution is not stopped at that point. Obviously Siler uses its own try catch handling around the resolver. What can I do that Siler outputs the Error in the debug output of my GraphQL response? Currently it seems to ignore the Exception.

throw new Exception('ERROR: This is a test');

geri777 commented 2 years ago

Sorry, this is not a Siler issue. Seems to be a problem with my code.