Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Exceptions/PHP/exceptions-1.php
Normal file
4
Task/Exceptions/PHP/exceptions-1.php
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class MyException extends Exception
|
||||
{
|
||||
// Custom exception attributes & methods
|
||||
}
|
||||
4
Task/Exceptions/PHP/exceptions-2.php
Normal file
4
Task/Exceptions/PHP/exceptions-2.php
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
function throwsException()
|
||||
{
|
||||
throw new Exception('Exception message');
|
||||
}
|
||||
5
Task/Exceptions/PHP/exceptions-3.php
Normal file
5
Task/Exceptions/PHP/exceptions-3.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
try {
|
||||
throwsException();
|
||||
} catch (Exception $e) {
|
||||
echo 'Caught exception: ' . $e->getMessage();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue