Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 455 Bytes

exception.md

File metadata and controls

33 lines (27 loc) · 455 Bytes

exception

exception

try {
    throw 'error!';
    throw new Error('error!');
}
catch (e) {
    console.log('error' + e.message);
}

const a = 'hard';

throw `a ${a} error!`

throw a + '!';
try {
    throw new \Exception("error!");
    throw new \Exception("error!");
}
catch (\Exception $e) {
    echo "error" . $e->getMessage();
}
$a = "hard";
throw new \Exception("a " . $a . " error!");
throw new \Exception($a . "!");