* Some refactoring of the exception handling code so that we can catch
Nix expression assertion failures.
This commit is contained in:
		
							parent
							
								
									fa72ae1e9c
								
							
						
					
					
						commit
						9088dee9e2
					
				
					 5 changed files with 45 additions and 22 deletions
				
			
		|  | @ -244,8 +244,9 @@ static Expr primDerivationStrict(EvalState & state, const ATermVector & args) | |||
|         try { | ||||
|             processBinding(state, value, drv, ss); | ||||
|         } catch (Error & e) { | ||||
|             throw Error(format("while processing the derivation attribute `%1%' at %2%:\n%3%") | ||||
|                 % key % showPos(pos) % e.msg()); | ||||
|             e.addPrefix(format("while processing the derivation attribute `%1%' at %2%:\n") | ||||
|                 % key % showPos(pos)); | ||||
|             throw; | ||||
|         } | ||||
| 
 | ||||
|         /* The `args' attribute is special: it supplies the
 | ||||
|  | @ -547,8 +548,9 @@ static Expr primDependencyClosure(EvalState & state, const ATermVector & args) | |||
|             } | ||||
| 
 | ||||
|         } catch (Error & e) { | ||||
|             throw Error(format("while finding dependencies in `%1%':\n%2%") | ||||
|                 % path % e.msg()); | ||||
|             e.addPrefix(format("while finding dependencies in `%1%':\n") | ||||
|                 % path); | ||||
|             throw; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue