diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-12-02 10:49:10 +0000 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-12-02 11:06:53 +0000 |
commit | 6110a6009fc77348e9c47e0801a9b884dc76c730 (patch) | |
tree | 40963b832551c478c0cb2c24d6364173cdd67dd2 /lib/tests/modules | |
parent | e76c78d20685a043d23f5f9e0ccd2203997f1fb1 (diff) |
lib/modules: Add context to the "option does not exist" error
Add trace items that provide context for a failed definition that can not be caught within the Nix language. This also adds a test for the `tryEval` behavior of `showDefs`.
Diffstat (limited to 'lib/tests/modules')
-rw-r--r-- | lib/tests/modules/define-enable-abort.nix | 3 | ||||
-rw-r--r-- | lib/tests/modules/define-enable-throw.nix | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/tests/modules/define-enable-abort.nix b/lib/tests/modules/define-enable-abort.nix new file mode 100644 index 0000000000000..85b58a567cad7 --- /dev/null +++ b/lib/tests/modules/define-enable-abort.nix @@ -0,0 +1,3 @@ +{ + config.enable = abort "oops"; +} diff --git a/lib/tests/modules/define-enable-throw.nix b/lib/tests/modules/define-enable-throw.nix new file mode 100644 index 0000000000000..16a59b781dc59 --- /dev/null +++ b/lib/tests/modules/define-enable-throw.nix @@ -0,0 +1,3 @@ +{ + config.enable = throw "oops"; +} |