Pengecualian :: GetMessage di PHP

<?php
try {
    throw new Exception("Some error message");
} catch(Exception $e) {
    echo $e->getMessage();
}
?>
  
 The above example will output something similar to:

Some error message
Nilesh