Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove backtrace from ECR errors #4851

Merged
merged 1 commit into from Sep 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/ecr/process.cr
@@ -1,2 +1,15 @@
require "ecr/processor"
puts ECR.process_file(ARGV[0], ARGV[1])

filename = ARGV[0]
buffer_name = ARGV[1]

begin
puts ECR.process_file(filename, buffer_name)
rescue ex : Errno
if {Errno::ENOENT, Errno::EISDIR}.includes?(ex.errno)
STDERR.puts ex.message
exit 1
else
raise ex
end
end