Sha256: 3faccc74d2fed7cb6529c1bf512003c5304931c0bfadbcf78e68abc9397cbd84
Contents?: true
Size: 821 Bytes
Versions: 11
Compression:
Stored size: 821 Bytes
Contents
class Exception < `Error` attr_reader :message def self.new(message = '') %x{ var err = new Error(message); err._klass = #{self}; return err; } end def backtrace %x{ var backtrace = #{self}.stack; if (typeof(backtrace) === 'string') { return backtrace.split("\\n").slice(0, 15); } else if (backtrace) { return backtrace.slice(0, 15); } return []; } end def inspect "#<#{self.class.name}: '#@message'>" end alias to_s message end StandardError = Exception RuntimeError = Exception LocalJumpError = Exception TypeError = Exception NameError = Exception NoMethodError = Exception ArgumentError = Exception IndexError = Exception KeyError = Exception RangeError = Exception
Version data entries
11 entries across 11 versions & 1 rubygems