src/Observable.php
public static function error(\Throwable $error, SchedulerInterface $scheduler = null): ErrorObservable
    {
        return new ErrorObservable($error, $scheduler ?: Scheduler::getImmediate());
    }
public static function error(\Throwable $error, SchedulerInterface $scheduler = null): ErrorObservable
    {
        return new ErrorObservable($error, $scheduler ?: Scheduler::getImmediate());
    }
public static function error ( \ Throwable $ error , SchedulerInterface $ scheduler = null ) : ErrorObservable { return new ErrorObservable ( $ error , $ scheduler ? : Scheduler :: getImmediate ( ) ) ; }
Returns an observable sequence that terminates with an exception.

@param \Throwable $error
@param SchedulerInterface $scheduler
@return ErrorObservable The observable sequence that terminates exceptionally with the specified exception object.

@demo error-observable/error-observable.php
@operator
@reactivex empty-never-throw
Returns an observable sequence that terminates with an exception .