Skip to content

Commit c8b88a4

Browse files
committed
fix: #35 - Limits the backtrace to 4 lines in our exceptions
1 parent 11a7584 commit c8b88a4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/leopard/errors.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
module Rubyists
44
module Leopard
5-
class Error < StandardError; end
5+
class LeopardError < StandardError
6+
def backtrace
7+
super[0..3] + ['... (truncated by Leopard)']
8+
end
9+
end
10+
11+
class Error < LeopardError; end
612
class ConfigurationError < Error; end
713
class ResultError < Error; end
814
end

0 commit comments

Comments
 (0)