When I'm developing my REST API in PHP I'm working with application/json
output, so when I get errors while testing in the browser they look like this:
<b>Fatal error</b>: Uncaught exception 'Exception' with message 'PDO caught an error:
array(3) {
[0]=>
string(5) "42000"
[1]=>
int(1065)
[2]=>
string(15) "Query was empty"
}
And it gets worse when I get large stack traces and stuff. So is there a flag I can set telling PHP that I want my errors unescaped and in raw text?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…