Class: WmiLite::WmiException

### Home Classes Methods

### In Files

- lib/wmi-lite/wmi_exception.rb

### Parent

Exception

### Methods

- ::new

### Class/Module Index

Quicksearch

- WmiLite
- WmiLite::Wmi
- WmiLite::Wmi::Instance
- WmiLite::WmiException

No matching classes.

# WmiLite::WmiException

### Public Class Methods

new(exception, wmi_method_context, namespace, query = nil, class_name = nil) click to toggle source

    # File lib/wmi-lite/wmi_exception.rb, line 21
    def initialize(exception, wmi_method_context, namespace, query = nil, class_name = nil)
      error_message = exception.message
      error_code = translate_error_code(error_message)

      case wmi_method_context
      when :ConnectServer
        error_message = translate_wmi_connect_error_message(error_message, error_code, namespace)
      when :ExecQuery
        error_message = translate_query_error_message(error_message, error_code, namespace, query, class_name)
      end

      super(error_message)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.