Class: OBIX::Objects::Error

Inherits:
Object show all
Defined in:
lib/obix/objects/error.rb

Overview

Errors represent errors.

Instance Attribute Summary

Attributes inherited from Base

#objects, #parent

Instance Method Summary collapse

Methods inherited from Base

#find, #initialize, parse, #to_node, #to_s, #to_xml

Methods included from Tag

#attribute, #tag

Constructor Details

This class inherits a constructor from OBIX::Objects::Base

Instance Method Details

#raiseObject

Raise an exception with this error.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/obix/objects/error.rb', line 9

def raise
  klass = case is
  when "obix:BadUriErr"
    OBIX::BadURIError
  when "obix:UnsupportedErr"
    OBIX::UnsupportedError
  when "obix:PermissionErr"
    OBIX::PermissionError
  else
    OBIX::Error
  end

  super klass, self.to_xml
end