Skip to content

Commit 7ce3923

Browse files
authored
Improve deprecation of Sentry.Config.root_source_code_path/0 (#558)
1 parent ab02160 commit 7ce3923

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/sentry/config.ex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,14 @@ defmodule Sentry.Config do
8383

8484
@deprecated "Use root_source_code_paths/0 instead"
8585
def root_source_code_path do
86-
path = get_config(:root_source_code_path, check_dsn: false)
87-
88-
if path do
86+
if path = get_config(:root_source_code_path, check_dsn: false) do
8987
path
9088
else
91-
raise ArgumentError.exception(":root_source_code_path must be configured")
89+
raise ArgumentError, """
90+
you called Sentry.Config.root_source_code_path/0, but :root_source_code_path is \
91+
not configured. root_source_code_path/0 is deprecated anyways, so you should \
92+
use root_source_code_paths/0 (plural) instead, and configure :root_source_code_paths.\
93+
"""
9294
end
9395
end
9496

0 commit comments

Comments
 (0)