Sha256: 556860fc9b08c1074ec94bcf747d37e5519406135b5f3e7bd23013d23c333030
Contents?: true
Size: 543 Bytes
Versions: 92
Compression:
Stored size: 543 Bytes
Contents
module Slaw module Parse class ParseError < Exception attr_accessor :line, :column def initialize(message, opts) super(message) self.line = opts[:line] self.column = opts[:column] end # TODO: move this elsewhere, it's out of context here def to_json(g=nil) msg = self.message msg = msg[0..200] + '...' if msg.length > 200 { message: msg, line: self.line, column: self.column, }.to_json(g) end end end end
Version data entries
92 entries across 92 versions & 1 rubygems