codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php try{ //The exception is thrown. throw new Exception('Parâmetros de consulta inválidos'); // and in the catch block it's caught successfully: }catch(Exception $e){ echo $e->getMessage(); //This prints the message correctly. $output = json_encode(array('msg'=>$e->getMessage())); echo $output; //But this fails...displays {"msg":null} } ?>
Private
[
?
]
Run code
Submit