Exception: XML::SAX::SAXParseException
Instance Method Summary
collapse
-
#getColumnNumber ⇒ Object
-
#getLineNumber ⇒ Object
-
#getPublicId ⇒ Object
-
#getSystemId ⇒ Object
-
#initialize(message, pubid = nil, sysid = nil, line = nil, column = nil, e = nil) ⇒ SAXParseException
constructor
initialize(String, Locator) initialize(String, Locator, Exception) initialize(String, String, String, Fixnum, Fixnum) initialize(String, String, String, Fixnum, Fixnum, Exception).
#getException, #getMessage, #toString
Constructor Details
#initialize(message, pubid = nil, sysid = nil, line = nil, column = nil, e = nil) ⇒ SAXParseException
initialize(String, Locator) initialize(String, Locator, Exception) initialize(String, String, String, Fixnum, Fixnum) initialize(String, String, String, Fixnum, Fixnum, Exception)
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
# File 'lib/xml/sax.rb', line 283
def initialize(message, pubid = nil, sysid = nil,
line = nil, column = nil, e = nil)
@publicId = nil
@systemiId = nil
@lineNumber = nil
@columnNumber = nil
if message.kind_of?(String) && pubid.kind_of?(Locator) &&
sysid.nil? && line.nil? && column.nil? && e.nil?
super(message)
@publicId = pubid.getPublicId
@systemId = pubid.getSystemId
@lineNumber = pubid.getLineNumber
@columnNumber = pubid.getColumnNumber
elsif message.kind_of?(String) && pubid.kind_of?(Locator) &&
sysid.kind_of?(Exception) && line.nil? && column.nil? && e.nil?
super(message, sysid)
@publicId = pubid.getPublicId
@systemId = pubid.getSystemId
@lineNumber = pubid.getLineNumber
@columnNumber = pubid.getColumnNumber
elsif message.kind_of?(String) && pubid.kind_of?(String) &&
sysid.kind_of?(String) && line.kind_of?(Fixnum) &&
column.kind_of?(Fixnum) && e.nil?
super(message)
@publicId = pubid
@systemId = sysid
@lineNumber = line
@columnNumber = column
elsif message.kind_of?(String) && pubid.kind_of?(String) &&
sysid.kind_of?(String) && line.kind_of?(Fixnum) &&
column.kind_of?(Fixnum) && e.kind_of?(Exception)
super(message, e)
@publicId = pubid
@systemId = sysid
@lineNumber = line
@columnNumber = column
else
raise TypeError.new("parameter error")
end
end
|
Instance Method Details
#getColumnNumber ⇒ Object
336
337
338
|
# File 'lib/xml/sax.rb', line 336
def getColumnNumber
@columnNumber
end
|
#getLineNumber ⇒ Object
332
333
334
|
# File 'lib/xml/sax.rb', line 332
def getLineNumber
@lineNumber
end
|
#getPublicId ⇒ Object
324
325
326
|
# File 'lib/xml/sax.rb', line 324
def getPublicId
@publicId
end
|
#getSystemId ⇒ Object
328
329
330
|
# File 'lib/xml/sax.rb', line 328
def getSystemId
@systemId
end
|