Created
July 4, 2014 14:07
-
-
Save rosedomini/2b5b13869af359e71fc6 to your computer and use it in GitHub Desktop.
Displays little but pertinent information about an error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Error | |
ProjectPath = "/Users/../analyse" | |
def self.light | |
message = "in #{([email protected][0..-1]).join(":\nin ")} | |
in #{$@[0]}:\n\t#{$!} (#{$!.class})" | |
message.gsub! ProjectPath, "$" | |
message.gsub! /\n\t+/, "\n" | |
puts | |
puts message.split("\n")[-1] | |
puts "\t" << message.split("\n")[-3..-2].join("\n\t") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment