lib/ting/exception.rb in ting-0.3.0 vs lib/ting/exception.rb in ting-0.9.0
- old
+ new
@@ -1,17 +1,14 @@
-module Ting
-
- # All exceptions arising from this module inherit from Ting::Error
-
- class Error < StandardError ; end
-
- class ParseError < Error
- attr_reader :input, :position
-
- def initialize(input, position)
- @input=input
- @position=position
- end
- end
-
-end
-
+module Ting
+
+ class ParseError < StandardError
+ attr_reader :input, :position
+
+ def initialize(input, position, error = nil)
+ super(error)
+ @input=input
+ @position=position
+ end
+ end
+
+end
+