开发者

Oracle exceptions displayed as PHP warnings not errors

开发者 https://www.devze.com 2023-02-09 04:18 出处:网络
I\'m interacting with an Oracle database using the oci8 interface. My problem is that whenever th开发者_Go百科e Oracle code raises an exception with an appropriate message and code, PHP emits a warni

I'm interacting with an Oracle database using the oci8 interface.

My problem is that whenever th开发者_Go百科e Oracle code raises an exception with an appropriate message and code, PHP emits a warning and not an error.

I need access to the error code, but oci_error always returns false (presumably because it is a warning not an error).

Is there any way to cause these warnings to be shown as errors and correctly populate the call to oci_error?


Turns out I was using the API incorrectly, when calling oci_error, you have to pass in the statement resource. This resulted in getting the correct error information.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号