diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-03-21 08:49:08 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-03-21 08:49:08 (GMT) |
commit | 61b8806cf3a1164ae145d42cc48ca7c432e2ab53 (patch) | |
tree | b2a6e7cfca293475579d77e3f05774cac2cacb06 /src/lib/tng_io.c | |
parent | 8fe5cdcb7c49596b4cf44eee5b0f0678bd069dc1 (diff) |
Print file position when failing to read block headers.
Diffstat (limited to 'src/lib/tng_io.c')
-rw-r--r-- | src/lib/tng_io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 66e7780..fdb7809 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -6095,7 +6095,8 @@ static tng_function_status tng_frame_set_align(tng_trajectory_t tng_data) { if(tng_block_header_read(tng_data, block) != TNG_SUCCESS) { - printf("Cannot read block header. %s: %d\n", __FILE__, __LINE__); + printf("Cannot read block header at pos %"PRId64". %s: %d\n", pos, + __FILE__, __LINE__); tng_data->input_file = temp; tng_block_destroy(&block); return(TNG_CRITICAL); @@ -6183,7 +6184,8 @@ static tng_function_status tng_frame_set_finalize { if(tng_block_header_read(tng_data, block) != TNG_SUCCESS) { - printf("Cannot read block header. %s: %d\n", __FILE__, __LINE__); + printf("Cannot read block header at pos %"PRId64". %s: %d\n", pos, + __FILE__, __LINE__); tng_data->input_file = temp; tng_block_destroy(&block); return(TNG_CRITICAL); |