Exception: Exception

Defined in:
lib/tdriver/util/common/exception.rb

Overview

Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Contact: Nokia Corporation ([email protected])

This file is part of Testability Driver.

If you have questions regarding the use of this file, please contact Nokia at [email protected] .

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation and appearing in the file LICENSE.LGPL included in the packaging of this file.

Instance Method Summary collapse

Instance Method Details

#nested_backtraceObject

TODO: document me



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/tdriver/util/common/exception.rb', line 23

def nested_backtrace

  if backtrace

    _backtrace = backtrace.dup
    
    begin

      _backtrace[ 0 ] = "#{ _backtrace.first.to_s } raised #{ self.class.name }: #{ message.to_s }"

      _backtrace.unshift( caller.first )

    rescue
    
      # exception raised, do not alter backtrace

    end

  else
  
    # no backtrace available
    _backtrace = []
  
  end

  # return backtrace array
  _backtrace

end