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

Invalid error handler #96

Open
woru opened this issue Apr 22, 2013 · 3 comments
Open

Invalid error handler #96

woru opened this issue Apr 22, 2013 · 3 comments

Comments

@woru
Copy link

woru commented Apr 22, 2013

ErrorHandler (Ruckusing_Exception.php:79) cannot call exit(1) for warnings.

E.g. when pg_query fails not only it sets error code but also it generates a warning.
Currently errorHandler calls exit(1) on warnings and db errors are not handled properly (e.g. migration that failed is not shown).

@salimane
Copy link
Collaborator

Hi,
Please could you provide a way to reproduce the error.
Thanks

@salimane
Copy link
Collaborator

By the way seems this was introduced with #95

@woru
Copy link
Author

woru commented Apr 22, 2013

Yes, it was introduced with #95.

steps:

  • env: postgres db, PHP 5.4.6-1ubuntu1.2
  • create a migration
  • in the up method add an invalid sql e.g. $this->execute("drop table dssdsdsdsd");
  • run migrations

Migration fails and there's a message: pg_query(): Query failed: ERROR: table "dssdsdsdsd" does not exist
but there's no info which migration failed.

Maybe we need exit(1) only in exception handler or we can add a check in errorHandler so that it doesn't call exit(1) for E_WARNING error code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants