bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

Scripts silently die when throwing exception in CLI mode #1185

Closed winternet-studio closed 4 years ago

winternet-studio commented 4 years ago

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 commented 4 years ago

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.

winternet-studio commented 4 years ago

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 commented 4 years ago

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.