* Make stack traces more consistent.

svn path=/nixpkgs/trunk/; revision=21652
This commit is contained in:
Eelco Dolstra 2010-05-07 15:13:43 +00:00
parent a3d73679b7
commit 5564bd2635
2 changed files with 9 additions and 9 deletions

View File

@ -219,7 +219,7 @@ rec {
decl = decl =
lib.addErrorContext "${eol lib.addErrorContext "${eol
}while enhancing option '${addName name}'.${eol }while enhancing option `${addName name}':${eol
}${errorSource declarations}${eol }${errorSource declarations}${eol
}" ( }" (
addOptionMakeUp addOptionMakeUp
@ -270,7 +270,7 @@ rec {
value = value =
lib.addErrorContext "${eol lib.addErrorContext "${eol
}while evaluating the option '${addName name}'.${eol }while evaluating the option `${addName name}':${eol
}${errorSource (modulesOf name)}${eol }${errorSource (modulesOf name)}${eol
}" ( }" (
let opt = option.decl; in let opt = option.decl; in

View File

@ -73,7 +73,7 @@ rec {
let cleanAttrs = rmProperties attrs; in let cleanAttrs = rmProperties attrs; in
if isProperty attrs then if isProperty attrs then
iter (a: v: iter (a: v:
lib.addErrorContext "while moving properties on the attribute `${a}'." ( lib.addErrorContext "while moving properties on the attribute `${a}':" (
triggerPropertiesGlobalDelay a ( triggerPropertiesGlobalDelay a (
triggerPropertiesDelay a ( triggerPropertiesDelay a (
copyProperties attrs v copyProperties attrs v
@ -88,7 +88,7 @@ rec {
triggerPropertiesDelay = name: attrs: triggerPropertiesDelay = name: attrs:
let let
callOnDelay = p@{property, ...}: callOnDelay = p@{property, ...}:
lib.addErrorContext "while calling a onDelay function." ( 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
@ -111,7 +111,7 @@ rec {
}; };
callOnGlobalDelay = property: content: callOnGlobalDelay = property: content:
lib.addErrorContext "while calling a onGlobalDelay function." ( lib.addErrorContext "while calling an `onGlobalDelay' function:" (
property.onGlobalDelay name content property.onGlobalDelay name content
); );
in in
@ -124,7 +124,7 @@ rec {
evalProperties = valList: evalProperties = valList:
if valList != [] then if valList != [] then
filter (x: !isNotdef x) ( filter (x: !isNotdef x) (
lib.addErrorContext "while evaluating properties." ( lib.addErrorContext "while evaluating properties:" (
triggerPropertiesGlobalEval ( triggerPropertiesGlobalEval (
evalLocalProperties valList evalLocalProperties valList
))) )))
@ -133,14 +133,14 @@ rec {
evalLocalProperties = valList: evalLocalProperties = valList:
filter (x: !isNotdef x) ( filter (x: !isNotdef x) (
lib.addErrorContext "while evaluating local properties." ( 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 a onEval function." ( lib.addErrorContext "while calling an `onEval' function:" (
if property ? onEval then if property ? onEval then
property.onEval p property.onEval p
else else
@ -165,7 +165,7 @@ rec {
}; };
callOnGlobalEval = property: valList: callOnGlobalEval = property: valList:
lib.addErrorContext "while calling a onGlobalEval function." ( lib.addErrorContext "while calling an `onGlobalEval' function:" (
property.onGlobalEval valList property.onGlobalEval valList
); );
in in