From 29d945b9b666bbe16b9974319fb715c5a7b3662f Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Mon, 17 Dec 2018 11:37:40 -0600 Subject: [PATCH] Use reraise and __STACKTRACE__ to reraise safe_insert_all errors Fixes #1238 `reraise` is the current accepted idiom for reraising, not `raise` alone as it preserves the original stacktrace. --- apps/explorer/lib/explorer/repo.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/repo.ex b/apps/explorer/lib/explorer/repo.ex index 90bb70cdcd..17f3ce9119 100644 --- a/apps/explorer/lib/explorer/repo.ex +++ b/apps/explorer/lib/explorer/repo.ex @@ -57,7 +57,7 @@ defmodule Explorer.Repo do Logger.configure(truncate: old_truncate) # reraise to kill caller - raise exception + reraise exception, __STACKTRACE__ end if returning do