Skip to content

Commit 30b766f

Browse files
committed
Avoid rescuing the Exception class
1 parent 606a233 commit 30b766f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def load_thorfile(path, content=nil, debug=false)
155155

156156
begin
157157
Thor::Sandbox.class_eval(content, path)
158-
rescue Exception => e
158+
rescue StandardError => e
159159
$stderr.puts("WARNING: unable to load thorfile #{path.inspect}: #{e.message}")
160160
if debug
161161
$stderr.puts(*e.backtrace)

0 commit comments

Comments
 (0)