Exception: R2CORBA::CORBA::SystemException

Inherits:
Exception
  • Object
show all
Defined in:
lib/corba/cbase/exception.rb,
lib/corba/jbase/exception.rb,
lib/corba/common/exception.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Exception

native2r

Constructor Details

#initialize(*args) ⇒ SystemException

Returns a new instance of SystemException.



48
49
50
51
52
53
# File 'lib/corba/cbase/exception.rb', line 48

def initialize(reason = '', minor = 0, completed = nil)
  super(reason)
  @minor = minor
  @completed = completed
  @ids = [self.class::Id]
end

Instance Attribute Details

#completedObject

Returns the value of attribute completed.



28
29
30
# File 'lib/corba/common/exception.rb', line 28

def completed
  @completed
end

#idsObject

Returns the value of attribute ids.



54
55
56
# File 'lib/corba/cbase/exception.rb', line 54

def ids
  @ids
end

#minorObject

Returns the value of attribute minor.



28
29
30
# File 'lib/corba/common/exception.rb', line 28

def minor
  @minor
end

Class Method Details

._raise(jex) ⇒ Object

Raises:

  • (ArgumentError)


35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/corba/cbase/exception.rb', line 35

def SystemException._raise(id, reason, minor, completed)
  name = id.to_s.split(':')[1]
  exklass = name.split('/').last
  exklass = CORBA.const_defined?(exklass) ? CORBA.const_get(exklass) : nil
  if exklass.nil? || !(CORBA::SystemException > exklass)
    Kernel.raise InternalError,
          'Unknown SystemException raised: ' +
          id.to_s + ' [' + reason.to_s + ']'
  else
    Kernel.raise exklass.new(reason, minor, completed)
  end
end

Instance Method Details

#_idsObject



55
# File 'lib/corba/cbase/exception.rb', line 55

def _ids; @ids; end

#_interface_repository_idObject



57
58
59
# File 'lib/corba/cbase/exception.rb', line 57

def _interface_repository_id
  self.class::Id
end

#reasonObject



29
30
31
# File 'lib/corba/common/exception.rb', line 29

def reason
  self.message
end

#to_sObject



33
34
35
# File 'lib/corba/common/exception.rb', line 33

def to_s
  "CORBA::#{self.class::Name}(#{super}) [minor=#{@minor};completed=#{COMPLETED_TXT[@completed.to_i]}]"
end