Skip to content

Instantly share code, notes, and snippets.

@rosedomini
rosedomini / gist:2b5b13869af359e71fc6
Created July 4, 2014 14:07
Displays little but pertinent information about an error
module Error
ProjectPath = "/Users/../analyse"
def self.light
message = "in #{($@.reverse[0..-1]).join(":\nin ")}
in #{$@[0]}:\n\t#{$!} (#{$!.class})"
message.gsub! ProjectPath, "$"
message.gsub! /\n\t+/, "\n"
puts
puts message.split("\n")[-1]