def raise(error, message=nil, backtrace=nil)
      unless error.is_a?(BeamError)
        message ||= error.respond_to?(:message) ? error.message : nil
        backtrace ||= error.respond_to?(:backtrace) ? error.backtrace : nil
        super(error, message, backtrace)
      end
      self.parent = error.parent if error.parent
      if Beam.current == self
        raise(error.error, message, backtrace)
      else
        @error ||= error
      end
    end
def raise(error, message=nil, backtrace=nil)
      unless error.is_a?(BeamError)
        message ||= error.respond_to?(:message) ? error.message : nil
        backtrace ||= error.respond_to?(:backtrace) ? error.backtrace : nil
        super(error, message, backtrace)
      end
      self.parent = error.parent if error.parent
      if Beam.current == self
        raise(error.error, message, backtrace)
      else
        @error ||= error
      end
    end
Fiber not provide raise method, so we have to simulate one
 @param [BeamError]  error currently only support raise BeamError