src/Ouzo/Core/Validatable.php
public function error($error, $code = 0)
    {
        $this->_errors[] = $error instanceof Error ? $error : new Error($code, $error);
    }
public function error($error, $code = 0)
    {
        $this->_errors[] = $error instanceof Error ? $error : new Error($code, $error);
    }
public function error ( $ error , $ code = 0 ) { $ this -> _errors [ ] = $ error instanceof Error ? $ error : new Error ( $ code , $ error ) ; }
Method for adding error manually
@param string|\Ouzo\ExceptionHandling\Error $error - \Ouzo\ExceptionHandling\Error instance or new error message
@param int $code - error code
Method for adding error manually