Exception: AdLint::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/adlint/error.rb

Overview

DESCRIPTION

Error base class for AdLint specific errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, loc = nil, *parts) ⇒ Error

DESCRIPTION

Constructs an error object.

PARAMETER

msg

String – Error message.

loc

Location – Location where an error occured.

parts

Array< Object > – Message formatting values.



46
47
48
49
50
# File 'lib/adlint/error.rb', line 46

def initialize(msg, loc = nil, *parts)
  super(msg)
  @location = loc
  @parts = parts
end

Instance Attribute Details

#locationObject (readonly)

VALUE

Location – The location where this error occured.



54
55
56
# File 'lib/adlint/error.rb', line 54

def location
  @location
end

#partsObject (readonly)

VALUE

Array – Message formatting values.



58
59
60
# File 'lib/adlint/error.rb', line 58

def parts
  @parts
end

Instance Method Details

#message_nameObject



60
61
62
# File 'lib/adlint/error.rb', line 60

def message_name
  subclass_responsibility
end