Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts silently die when throwing exception in CLI mode #1185

Closed
winternet-studio opened this issue Mar 16, 2020 · 3 comments
Closed

Scripts silently die when throwing exception in CLI mode #1185

winternet-studio opened this issue Mar 16, 2020 · 3 comments

Comments

@winternet-studio
Copy link

winternet-studio commented Mar 16, 2020

When you throw an exception (throw new \Exception('Some error...');) in CLI mode the script silently dies without no output to the console. It is only logged in PHP's error log.

That should not be default behaviour I would say.

Btw, this is on Windows. If I run it in my Linux environment it should just fine.

@pauljherring
Copy link

This looks more like a question for the mailing list. (https://groups.google.com/forum/#!forum/f3-framework)

Anyway - have you checked display_errors in your ini file? Note that the cli will typically be using a different ini file to the one used by your webserver.

  • php -r "phpinfo();" | grep php.ini to check for which one it's using.
  • php -d display_errors=on .... to override it anyway.

@winternet-studio
Copy link
Author

winternet-studio commented Mar 16, 2020

Yes, display_errors is on. And it works just fine until I initiate the F3 framework...

Btw, this is on Windows. If I run it in my Linux environment it works just fine.

ikkez added a commit to f3-factory/fatfree-core that referenced this issue Aug 13, 2020
@ikkez
Copy link
Collaborator

ikkez commented Aug 14, 2020

The framework sets ini_set('display_errors',0); on initialization, so I think it should be handle displaying at least any error message if not QUIET turned on.

@ikkez ikkez closed this as completed Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants