protected function getCompatibleClass( $className )
  {
    if( ! $className || ! is_string( $className )){
      $className = get_class( $this );
    }
    $class = $className;

    if( ! $this->checkClassForCompability( $class )){
      $class = $this->checkClassForCompability( $class .'Exception' );
    }

    if( ! $class ) {
      if( $parent = get_parent_class( $className ) ) {
        $class = $this->getCompatibleClass( $parent );
      } else {
        $class = __NAMESPACE__ .'\DeferredExceptionsException';
      }
    }

    return $class;
  }
protected function getCompatibleClass( $className )
  {
    if( ! $className || ! is_string( $className )){
      $className = get_class( $this );
    }
    $class = $className;

    if( ! $this->checkClassForCompability( $class )){
      $class = $this->checkClassForCompability( $class .'Exception' );
    }

    if( ! $class ) {
      if( $parent = get_parent_class( $className ) ) {
        $class = $this->getCompatibleClass( $parent );
      } else {
        $class = __NAMESPACE__ .'\DeferredExceptionsException';
      }
    }

    return $class;
  }
protected function getCompatibleClass ( $ className ) { if ( ! $ className || ! is_string ( $ className ) ) { $ className = get_class ( $ this ) ; } $ class = $ className ; if ( ! $ this -> checkClassForCompability ( $ class ) ) { $ class = $ this -> checkClassForCompability ( $ class . 'Exception' ) ; } if ( ! $ class ) { if ( $ parent = get_parent_class ( $ className ) ) { $ class = $ this -> getCompatibleClass ( $ parent ) ; } else { $ class = __NAMESPACE__ . '\DeferredExceptionsException' ; } } return $ class ; }
Returns the class to throw exception

@param string $className The desired class to use
@return string
Returns the class to throw exception