Skip to content

Commit 8cac5fd

Browse files
committed
implement custom XmlException
1 parent bc0cc73 commit 8cac5fd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Exceptions/XmlException.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace dvlpr1996\PhpEnumHelperTrait\Exceptions;
4+
5+
class XmlException extends \Exception
6+
{
7+
public function __construct(string $message, int $statusCode = 500, $previous = null)
8+
{
9+
parent::__construct($message . ' File Path Not Exists', $statusCode, $previous);
10+
}
11+
12+
public function __toString(): string
13+
{
14+
return __CLASS__ . ' : ' . $this->message;
15+
}
16+
}

0 commit comments

Comments
 (0)