[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
220/376: Don't evaluate inside a "throw"
From: |
Ludovic Courtès |
Subject: |
220/376: Don't evaluate inside a "throw" |
Date: |
Wed, 28 Jan 2015 22:05:11 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 53b044c2f6f9e309037d5545374a7d257dbbb590
Author: Eelco Dolstra <address@hidden>
Date: Mon Sep 22 18:49:49 2014 +0200
Don't evaluate inside a "throw"
Workaround for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41174. This caused
hydra-eval-jobs to ignore SIGINT.
---
src/libexpr/primops.cc | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index a25bd88..0892d5d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -333,15 +333,16 @@ static void prim_genericClosure(EvalState & state, const
Pos & pos, Value * * ar
static void prim_abort(EvalState & state, const Pos & pos, Value * * args,
Value & v)
{
PathSet context;
- throw Abort(format("evaluation aborted with the following error message:
‘%1%’") %
- state.coerceToString(pos, *args[0], context));
+ string s = state.coerceToString(pos, *args[0], context);
+ throw Abort(format("evaluation aborted with the following error message:
‘%1%’") % s);
}
static void prim_throw(EvalState & state, const Pos & pos, Value * * args,
Value & v)
{
PathSet context;
- throw ThrownError(format("%1%") % state.coerceToString(pos, *args[0],
context));
+ string s = state.coerceToString(pos, *args[0], context);
+ throw ThrownError(s);
}
- 216/376: Handle cycles when printing a value, (continued)
- 216/376: Handle cycles when printing a value, Ludovic Courtès, 2015/01/28
- 211/376: Fix off-by-one, Ludovic Courtès, 2015/01/28
- 215/376: Add ‘seq’ primop, Ludovic Courtès, 2015/01/28
- 209/376: Store Attrs inside Bindings, Ludovic Courtès, 2015/01/28
- 208/376: Remove bogus comment, Ludovic Courtès, 2015/01/28
- 219/376: Add ‘deepSeq’ primop, Ludovic Courtès, 2015/01/28
- 225/376: Pass through --set from nix-install-package command line to nix-env, Ludovic Courtès, 2015/01/28
- 214/376: Add a function ‘valueSize’, Ludovic Courtès, 2015/01/28
- 145/376: Use proper quotes everywhere, Ludovic Courtès, 2015/01/28
- 226/376: Add --force-name support for --set in nix-env, to support nix-install-package --set, Ludovic Courtès, 2015/01/28
- 220/376: Don't evaluate inside a "throw",
Ludovic Courtès <=
- 217/376: Rename strictForceValue -> forceValueDeep, Ludovic Courtès, 2015/01/28
- 227/376: Updated documentation for nix-install-package to mention --set flag, Ludovic Courtès, 2015/01/28
- 228/376: Fix use of PAGER during tests, Ludovic Courtès, 2015/01/28
- 221/376: Remove release notes Hydra product, Ludovic Courtès, 2015/01/28
- 218/376: Make forceValueDeep work on values with cycles, Ludovic Courtès, 2015/01/28
- 229/376: Remove bash requirement, Ludovic Courtès, 2015/01/28
- 231/376: nix-daemon: Close unnecessary fd, Ludovic Courtès, 2015/01/28
- 230/376: Bindings: Remove copy constructor, Ludovic Courtès, 2015/01/28
- 222/376: Add missing static, Ludovic Courtès, 2015/01/28
- 223/376: manual: add a note that lists are strict in length, Ludovic Courtès, 2015/01/28