This repository has been archived by the owner on Nov 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from silathdiir/replacing_config_prefix_with_ke…
…y_mapping Releases `0.0.2`
- Loading branch information
Showing
12 changed files
with
226 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: elixir | ||
elixir: | ||
- 1.5.3 | ||
otp_release: | ||
- 19.3 | ||
- 20.2 | ||
dist: trusty | ||
notifications: | ||
recipients: | ||
- [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,12 @@ | ||
use Mix.Config | ||
|
||
config :rat_error, RatError.Structure, | ||
# Node Name, the default value is 'error'. | ||
# | ||
# If node is 'err', the structure is, | ||
# | ||
# %{ | ||
# err: | ||
# %{ | ||
# code: :invalid_argument, | ||
# file: "/home/dummy/my_app/web/user_controller.ex", | ||
# function: {:authenticate, 1}, | ||
# line: 123, | ||
# message: "wrong token!", | ||
# module: Elixir.MyApp.Registration.UserController | ||
# } | ||
# } | ||
# | ||
# If node is nil or an empty string, the node is removed. The fields are | ||
# exposed outside, and the below configuration 'prefix' could be set to | ||
# distinguish with other caller's keys. | ||
node: :error, | ||
|
||
# Field Prefix, the default value is nil (NO prefix). | ||
# | ||
# If node is nil and prefix is 'err_', the structure is, | ||
# | ||
# %{ | ||
# err_code: :invalid_argument, | ||
# err_file: "/home/dummy/my_app/web/user_controller.ex", | ||
# err_function: {:authenticate, 1}, | ||
# err_line: 123, | ||
# err_message: "wrong token!", | ||
# err_module: Elixir.MyApp.Registration.UserController | ||
# } | ||
# | ||
prefix: nil, | ||
|
||
# Support Keys | ||
keys: | ||
[ | ||
# Error code defined by caller, e.g. an atom :no_entry, an integer 9 or a | ||
# string "unexpected". | ||
:code, | ||
|
||
# Error file path. | ||
:file, | ||
|
||
# Error function name. | ||
:function, | ||
|
||
# Error file line. | ||
:line, | ||
|
||
# Error message of string passed in by caller. | ||
:message, | ||
|
||
# Error module. | ||
:module | ||
] | ||
keys: %{ | ||
code: :code, | ||
file: :file, | ||
function: :function, | ||
line: :line, | ||
message: :message, | ||
module: :module | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
use Mix.Config | ||
|
||
config :rat_error, RatError.Structure, | ||
node: :error, | ||
prefix: nil, | ||
keys: :code | ||
node: :error, | ||
keys: %{ | ||
code: :code, | ||
message: :message | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
use Mix.Config | ||
|
||
config :rat_error, RatError.Structure, | ||
node: :error, | ||
prefix: nil, | ||
keys: | ||
[ | ||
:code, | ||
:file, | ||
:function, | ||
:line, | ||
:message, | ||
:module | ||
] | ||
node: :error, | ||
keys: %{ | ||
code: :code, | ||
file: :file, | ||
function: :function, | ||
line: :line, | ||
message: :message, | ||
module: :module | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.