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

db/adapter.php is printing error page instead of passing along the Exception #12182

Closed
blizzz opened this issue Nov 14, 2014 · 3 comments
Closed
Milestone

Comments

@blizzz
Copy link
Contributor

blizzz commented Nov 14, 2014

In that part https://github.com/owncloud/core/blob/master/lib/private/db/adapter.php#L74 the Adapter catches the Exception as delivered by Doctrine and outputs an error page. That makes application unable to respond properly on database issues.

Instead printing the error page, we can keep logging this error and throwing the Exception again. Since we have a global catch, we would not end up in a blank page, so it should be safe to do so.

Opinions? @DeepDiver1975 @MorrisJobke @butonic

@blizzz blizzz added this to the 2014-sprint-08-current milestone Nov 14, 2014
@MorrisJobke
Copy link
Contributor

@blizzz Sounds good. And we should use our global exception handling where it is useful. Maybe not log the error there but add the information to the Exception (use HintException) and then it will be displayed to the user (if debug session) and written to the log in the global exception handling mechanism. Am I correct @LukasReschke

@LukasReschke
Copy link
Member

An uncatched exception will be displayed fully to the user if debug session, otherwise a generic error page is shown. An Hint Exception will show the hint to the user.

@DeepDiver1975
Copy link
Member

👍 yes - we for sure need to get rid of all these code pieces - the top level code has to catch any exception and handle them properly - refs #11834

@blizzz blizzz closed this as completed in 7ed678b Nov 15, 2014
MorrisJobke added a commit that referenced this issue Nov 15, 2014
eliminate OC_Template::printErrorPage in database classes, fixes #12182
@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants