diff options
| author | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2013-10-22 19:11:57 +0200 |
|---|---|---|
| committer | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2013-10-22 19:11:57 +0200 |
| commit | 162a8ed6d5abf8bb1e36a4f5794073f7870fd20c (patch) | |
| tree | 1de1ff5e19d4cd0a34b41498194424bea61ea769 /tests | |
| parent | 44540b9335f3bbd2f6fda3e13329b28ec76b6d7a (diff) | |
| download | lanes-162a8ed6d5abf8bb1e36a4f5794073f7870fd20c.tar.gz lanes-162a8ed6d5abf8bb1e36a4f5794073f7870fd20c.tar.bz2 lanes-162a8ed6d5abf8bb1e36a4f5794073f7870fd20c.zip | |
errors inside finalizers generate a full stack just like any other error
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/error.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/error.lua b/tests/error.lua index c4a64e3..91015d8 100644 --- a/tests/error.lua +++ b/tests/error.lua | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | -- Note: this code is supposed to end in errors; not included in 'make test' | 4 | -- Note: this code is supposed to end in errors; not included in 'make test' |
| 5 | -- | 5 | -- |
| 6 | 6 | ||
| 7 | local lanes = require "lanes" | 7 | local lanes = require "lanes".configure() |
| 8 | lanes.configure() | ||
| 9 | 8 | ||
| 10 | local function lane() | 9 | local function lane() |
| 11 | 10 | ||
| @@ -32,7 +31,7 @@ local h= lgen() | |||
| 32 | local _,err,stack= h:join() -- wait for the lane (no automatic error propagation) | 31 | local _,err,stack= h:join() -- wait for the lane (no automatic error propagation) |
| 33 | 32 | ||
| 34 | if err then | 33 | if err then |
| 35 | assert( type(stack)=="table" ) | 34 | assert( type(stack)=="table" ) -- only true if lanes was compiled with ERROR_FULL_STACK == 1 |
| 36 | io.stderr:write( "Lane error: "..tostring(err).."\n" ) | 35 | io.stderr:write( "Lane error: "..tostring(err).."\n" ) |
| 37 | 36 | ||
| 38 | io.stderr:write( "\t", table.concat(stack,"\n\t"), "\n" ); | 37 | io.stderr:write( "\t", table.concat(stack,"\n\t"), "\n" ); |
