Get rid of some error contexts that don't provide useful info
This commit is contained in:
+16
-26
@@ -100,12 +100,10 @@ rec {
|
|||||||
triggerPropertiesDelay = name: attrs:
|
triggerPropertiesDelay = name: attrs:
|
||||||
let
|
let
|
||||||
callOnDelay = p@{property, ...}:
|
callOnDelay = p@{property, ...}:
|
||||||
lib.addErrorContext "while calling an `onDelay' function:" (
|
if property ? onDelay then
|
||||||
if property ? onDelay then
|
property.onDelay name p
|
||||||
property.onDelay name p
|
else
|
||||||
else
|
p;
|
||||||
p
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
foldProperty callOnDelay id attrs;
|
foldProperty callOnDelay id attrs;
|
||||||
|
|
||||||
@@ -123,9 +121,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
callOnGlobalDelay = property: content:
|
callOnGlobalDelay = property: content:
|
||||||
lib.addErrorContext "while calling an `onGlobalDelay' function:" (
|
property.onGlobalDelay name content;
|
||||||
property.onGlobalDelay name content
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
fold callOnGlobalDelay attrs globalDelayFuns;
|
fold callOnGlobalDelay attrs globalDelayFuns;
|
||||||
|
|
||||||
@@ -136,28 +132,25 @@ rec {
|
|||||||
evalProperties = valList:
|
evalProperties = valList:
|
||||||
if valList != [] then
|
if valList != [] then
|
||||||
filter (x: !isNotdef x) (
|
filter (x: !isNotdef x) (
|
||||||
lib.addErrorContext "while evaluating properties:" (
|
triggerPropertiesGlobalEval (
|
||||||
triggerPropertiesGlobalEval (
|
evalLocalProperties valList
|
||||||
evalLocalProperties valList
|
)
|
||||||
)))
|
)
|
||||||
else
|
else
|
||||||
valList;
|
valList;
|
||||||
|
|
||||||
evalLocalProperties = valList:
|
evalLocalProperties = valList:
|
||||||
filter (x: !isNotdef x) (
|
filter (x: !isNotdef x) (
|
||||||
lib.addErrorContext "while evaluating local properties:" (
|
map triggerPropertiesEval valList
|
||||||
map triggerPropertiesEval valList
|
);
|
||||||
));
|
|
||||||
|
|
||||||
# Call onEval function
|
# Call onEval function
|
||||||
triggerPropertiesEval = val:
|
triggerPropertiesEval = val:
|
||||||
foldProperty (p@{property, ...}:
|
foldProperty (p@{property, ...}:
|
||||||
lib.addErrorContext "while calling an `onEval' function:" (
|
if property ? onEval then
|
||||||
if property ? onEval then
|
property.onEval p
|
||||||
property.onEval p
|
else
|
||||||
else
|
p
|
||||||
p
|
|
||||||
)
|
|
||||||
) id val;
|
) id val;
|
||||||
|
|
||||||
# Call onGlobalEval function
|
# Call onGlobalEval function
|
||||||
@@ -176,10 +169,7 @@ rec {
|
|||||||
) [] valList;
|
) [] valList;
|
||||||
};
|
};
|
||||||
|
|
||||||
callOnGlobalEval = property: valList:
|
callOnGlobalEval = property: valList: property.onGlobalEval valList;
|
||||||
lib.addErrorContext "while calling an `onGlobalEval' function:" (
|
|
||||||
property.onGlobalEval valList
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
fold callOnGlobalEval valList globalEvalFuns;
|
fold callOnGlobalEval valList globalEvalFuns;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user