Class: Com::Vmware::Vapi::Std::Errors::Canceled

Inherits:
Error
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb

Overview

The ``Com::Vmware::Vapi::Std::Errors::Canceled`` error indicates that the method canceled itself in response to an explicit request to do so. Methods being “canceled” for other reasons (for example the client connection was closed, a time out occured, or due to excessive resource consumption) should not report this error .


 Examples:  

  * A user is monitoring the progress of the  method  in a GUI and sees that it is likely to take longer than he is willing to wait and clicks the cancel button. 
   * A user invokes the  method  using a command-line tool and decides that she didn't really want to invoke that  method , and presses CTRL-c. 
  
   

 Counterexamples:  

  * The client's connection to the server was closed. Reporting an  error  is pointless since the client will not receive the error response because the connection has been closed. 
   * The request is taking longer than some amount of time. The   :class:`Com::Vmware::Vapi::Std::Errors::TimedOut`    error  would be reported if the time was specified as part of the input or is documented in the API contract.

Instance Attribute Summary

Attributes inherited from Error

#data, #messages

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Canceled) initialize(binding_type = self.class.binding_type, error_value = nil)

Constructs a new instance.

Parameters:

  • binding_type (VAPI::Bindings::BindingType) (defaults to: self.class.binding_type)

    the specific BindingType declaration for this concrete VapiError type

  • error_value (VAPI::Data::ErrorValue) (defaults to: nil)

    the error value (default nil)



1045
1046
1047
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb', line 1045

def initialize(binding_type=self.class.binding_type, error_value=nil)
    super(binding_type, error_value)
end

Class Method Details

+ (VAPI::Bindings::ErrorType) binding_type

Holds (gets or creates) the binding type metadata for this error type.

Returns:

  • (VAPI::Bindings::ErrorType)

    the binding type



1029
1030
1031
1032
1033
1034
1035
1036
1037
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb', line 1029

def binding_type
    @binding_type ||= VAPI::Bindings::ErrorType.new(
        'com.vmware.vapi.std.errors.canceled',
        {
            'messages' => VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
            'data' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DynamicStructType.new()),
        },
        Canceled)
end