<?php
class Exception
{
protected $message = 'Unknown exception'; // 예외 메시지
private $string; // __toString 캐시
protected $code = 0; // 사용자 정의 예외 코드
protected $file; // 예외가 발생한 소스 파일 이름
protected $line; // 예외가 발생한 소스 라인
private $trace; // backtrace
private $previous; // 중첩 예외의 경우 이전 예외
public function __construct($message = null, $code = 0, Exception $previous = null);
final private function __clone(); // 예외의 복제를 금지합니다.
final public function getMessage(); // 예외 메시지
final public function getCode(); // 예외 코드
final public function getFile(); // 소스 파일 이름
final public function getLine(); // 소스 라인
final public function getTrace(); // backtrace() 배열
final public function getPrevious(); // 이전 예외
final public function getTraceAsString(); // trace의 형식화 문자열
// Overrideable
public function __toString(); // 출력을 위한 형식화 문자열
}
?>
_toString()
: Exception 객체의 정보를 문자열로 반환한다.system/src/Framework/Debug/Exception
내에 정의되어 있는 것을 사용할 수 있습니다.throw new AlertBackException('메시지');
use Framework\Debug\Exception\LayerException;
throw new LayerException('메시지', null, null, $formId, $timer, $onUnBlock, $addScript, $isPrint);
throw new LayerException(__('상품 승인 요청이 철회 되었습니다.'));
use Framework\Debug\Exception\LayerNotReloadException;
throw new LayerNotReloadException(__('타임딜 / 원어데이 상품은 수정할 수 없습니다.'));
use Framework\Debug\Exception\AlertBackException;
try {
} catch (\Exception $e) {
throw new AlertBackException($e->getMessage());
}
http://php.adamharvey.name/manual/kr/language.exceptions.extending.php
http://jun.hansung.ac.kr/SWP/PHP/PHP%20Exception%20Handling.html
http://php.adamharvey.name/manual/kr/language.exceptions.extending.php