-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Modify Oci8Exception object to add access to Oracle debugging detail #53
base: master
Are you sure you want to change the base?
Conversation
@cartbeforehorse really like the idea, could you refomat & cleanup your variables & functions? |
@mstaack I'm not clear what I need to do. What is it that needs tidying? |
Reviewing this and this is the difference when doing a tinker session in Laravel: With this PR, the console log is:
This is how it currently looks:
In this regard, I guess we could retain the original error display but we can add a chain of error that the user can use to fit their requirements. What do you think? Thanks! |
@@ -166,15 +166,8 @@ public function execute($inputParams = null) | |||
|
|||
if ($result != true) { | |||
$e = oci_error($this->sth); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can retain this message part as it is easier to debug with all this error message displayed by default?
As per request for a Pull Request, I'm now submitting changes that I've applied.
The objective is to build better Oracle debugging support into the Oci8Exception class, so that (for example) user-facing error-messages are easier to extract.
These changes are slightly different than the original suggestions documented in the original thread. Rather than allow Exception-throwing code in
Statement.php
to build a lengthy message string to pass to the Exception object, I've decided to simply pass the PDO exception-array to the Exception class instead, so that the Exception class itself can do the legwork. This reduces the overhead of constructing and de-constructing the message string to find the necessary debug info.