class CustomErrors::ParseError
Public Class Methods
new(msg, path = nil)
click to toggle source
Calls superclass method
# File lib/jenkins_pipeline_builder/custom_errors.rb, line 3 def initialize(msg, path = nil) super(format_msg(msg, path).squeeze(' ')) end
Private Instance Methods
format_msg(msg, path)
click to toggle source
# File lib/jenkins_pipeline_builder/custom_errors.rb, line 9 def format_msg(msg, path) if path.nil? %(There was an error while parsing a file: #{msg}) else %(There was an error while parsing a file: #{path} #{msg}) end end