summary refs log tree commit diff
path: root/pkgs/lib
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-04 12:08:27 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-04 12:58:22 +0100
commit3bdf95e05b3c929d035d980a30a350187bcb0b99 (patch)
tree02544117f2bfd2466baa602a09bb0d16560ed518 /pkgs/lib
parent9a92f3fc35698f2baef1b40f1ed4eb1ae93ba14f (diff)
Get rid of some error contexts that don't provide useful info
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/properties.nix42
1 files changed, 16 insertions, 26 deletions
diff --git a/pkgs/lib/properties.nix b/pkgs/lib/properties.nix
index 5b40e272ed503..eeac27ae70c7b 100644
--- a/pkgs/lib/properties.nix
+++ b/pkgs/lib/properties.nix
@@ -100,12 +100,10 @@ rec {
   triggerPropertiesDelay = name: attrs:
     let
       callOnDelay = p@{property, ...}:
-        lib.addErrorContext "while calling an `onDelay' function:" (
-          if property ? onDelay then
-            property.onDelay name p
-          else
-            p
-        );
+        if property ? onDelay then
+          property.onDelay name p
+        else
+          p;
     in
       foldProperty callOnDelay id attrs;
 
@@ -123,9 +121,7 @@ rec {
       };
 
       callOnGlobalDelay = property: content:
-        lib.addErrorContext "while calling an `onGlobalDelay' function:" (
-          property.onGlobalDelay name content
-        );
+        property.onGlobalDelay name content;
     in
       fold callOnGlobalDelay attrs globalDelayFuns;
 
@@ -136,28 +132,25 @@ rec {
   evalProperties = valList:
     if valList != [] then
       filter (x: !isNotdef x) (
-        lib.addErrorContext "while evaluating properties:" (
-          triggerPropertiesGlobalEval (
-            evalLocalProperties valList
-      )))
+        triggerPropertiesGlobalEval (
+          evalLocalProperties valList
+        )
+      )
     else
       valList;
 
   evalLocalProperties = valList:
     filter (x: !isNotdef x) (
-      lib.addErrorContext "while evaluating local properties:" (
-        map triggerPropertiesEval valList
-    ));
+      map triggerPropertiesEval valList
+    );
 
   # Call onEval function
   triggerPropertiesEval = val:
     foldProperty (p@{property, ...}:
-      lib.addErrorContext "while calling an `onEval' function:" (
-        if property ? onEval then
-          property.onEval p
-        else
-          p
-      )
+      if property ? onEval then
+        property.onEval p
+      else
+        p
     ) id val;
 
   # Call onGlobalEval function
@@ -176,10 +169,7 @@ rec {
           ) [] valList;
       };
 
-      callOnGlobalEval = property: valList:
-        lib.addErrorContext "while calling an `onGlobalEval' function:" (
-          property.onGlobalEval valList
-        );
+      callOnGlobalEval = property: valList: property.onGlobalEval valList;
     in
       fold callOnGlobalEval valList globalEvalFuns;