Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
显示异常但不显示完整堆栈跟踪需要什么错误报告组合?
IE:
throw new Exception("This is an exception");
显示“这是一个例外”,但不显示后面的完整跟踪?
用于set_exception_handler创建您自己的仅显示错误消息的异常处理程序
set_exception_handler
例如:
set_exception_handler( function($e) { echo $e->getMessage(); //exit(); dont have to be called } );