# module Puppet::ExternalFileError

### Attributes

file[RW]

This module implements logging with a filename and line number. Use this for errors that need to report a location in a non-ruby file that we parse.

line[RW]

This module implements logging with a filename and line number. Use this for errors that need to report a location in a non-ruby file that we parse.

### Public Class Methods

new(message, file=nil, line=nil, original=nil) click to toggle source
Calls superclass method

    # File lib/puppet/error.rb, line 17
    def initialize(message, file=nil, line=nil, original=nil)
      super(message, original)
      @file = file
      @line = line
    end

### Public Instance Methods

to_s() click to toggle source
Calls superclass method

    # File lib/puppet/error.rb, line 23
    def to_s
      msg = super
      if @file and @line
        "#{msg} at #{@file}:#{@line}"
      elsif @line
        "#{msg} at line #{@line}"
      elsif @file
        "#{msg} in #{@file}"
      else
        msg
      end
    end