Home > Backend Development > PHP Tutorial > Thinkphp turns off debug, how can the thrown information in the third-party library be displayed?

Thinkphp turns off debug, how can the thrown information in the third-party library be displayed?

WBOY
Release: 2016-09-08 08:29:39
Original
1066 people have browsed it

Because of tp, the throwing function is used, but when debug is turned off, those error throwing functions are blocked.
Once an error is thrown, it will jump directly to the error page without displaying the error content.
Like WeChat Pay and other class libraries, after I referenced them, some exceptions were thrown in the program and I saw the content. How can I turn off debug and still see the thrown content.

<code>throw new SDKRuntimeException("统一支付接口中,缺少必填参数openid!trade_type为JSAPI时,openid为必填参数!" . "<br>");


class  SDKRuntimeException extends Exception {
    public function errorMessage()
    {
        return $this->getMessage();
    }

}




</code>
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template