CapMousse / Jet

A light php framework
7 stars 0 forks source link

Horrible PHP Errors #12

Open Jamesking56 opened 12 years ago

Jamesking56 commented 12 years ago

Upon running the framework on its own, I get PHP errors referencing the log files:

"Warning: error_log(/Jet/web/../project/logs/info.log) [function.error-log]: failed to open stream: Permission denied in /Jet/core/log.php on line 107"

I know that this is caused by incorrect permissions but shouldn't there be a better way of handling the error instead of dumping a nasty PHP error?

CapMousse commented 12 years ago

Yep, very nasty error ! I will print a message when permission is not ok Le 8 fvr. 2012 00:29, "James King" < reply@reply.github.com> a crit :

Upon running the framework on its own, I get PHP errors referencing the log files:

"Warning: error_log(/Jet/web/../project/logs/info.log) [function.error-log]: failed to open stream: Permission denied in /Jet/core/log.php on line 107"

I know that this is caused by incorrect permissions but shouldn't there be a better way of handling the error instead of dumping a nasty PHP error?


Reply to this email directly or view it on GitHub: https://github.com/CapMousse/Jet/issues/12

Jamesking56 commented 12 years ago

That would be better, maybe even write a whole Error Handling class that also logs errors in the whole framework?

CapMousse commented 12 years ago

Good idea ! Le 8 fvr. 2012 00:42, "James King" < reply@reply.github.com> a crit :

That would be better, maybe even write a whole Error Handling class that also logs errors in the whole framework?


Reply to this email directly or view it on GitHub: https://github.com/CapMousse/Jet/issues/12#issuecomment-3859440

CapMousse commented 12 years ago

Fixed for the moment, display a message when the log dir&files aren't writable.

I will add a ErrorHandler class in a few day

CapMousse commented 12 years ago

Maybe i can add something like PHP bug Lost on the framework ?

Jamesking56 commented 12 years ago

Yeah could do then make a configuration option to switch it on or off so that the user can switch it off for production.

CapMousse commented 12 years ago

Yep !

CapMousse commented 12 years ago

So, i'm rewriting some parts of the code to have real exception throw and catch with a more beautiful way to display them ;)

And i'm completely rewriting Jet-ORM to respect the PSR-0 standar, stay tunned !

Jamesking56 commented 9 years ago

Do we have an update years later or...?