This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new ce0972b Log error; simply using safe evaluation
ce0972b is described below
commit ce0972b90bcd36b8fe34355f82202c152c974378
Author: Sebb <[email protected]>
AuthorDate: Thu Oct 22 22:29:02 2020 +0100
Log error; simply using safe evaluation
---
www/secretary/workbench/views/actions/drop.json.rb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/www/secretary/workbench/views/actions/drop.json.rb
b/www/secretary/workbench/views/actions/drop.json.rb
index d227043..329c56f 100644
--- a/www/secretary/workbench/views/actions/drop.json.rb
+++ b/www/secretary/workbench/views/actions/drop.json.rb
@@ -22,13 +22,13 @@ begin
message.delete_attachment @source
-rescue
- Wunderbar.error "Failed to concatenate #{@target} and #{@source}"
+rescue StandardError => e
+ Wunderbar.error "Failed to concatenate #{@target} and #{@source}: #{e}"
raise
ensure
- source.unlink if source
- target.unlink if target
- output.unlink if output
+ source&.unlink
+ target&.unlink
+ output&.unlink
end
{attachments: message.attachments, selected: name}