diff options
author | Guy Harris <gharris@sonic.net> | 2020-10-13 18:48:46 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-10-14 04:51:45 +0000 |
commit | 6e6233521aa4f0e82b79219cb7e32912012d9ccf (patch) | |
tree | 1836305bf265c1aff78d61677343f3fa23bc2aac /reordercap.c | |
parent | 92e1b110f3f70d295adb10ce0dc5fad9a7189912 (diff) |
Have WTAP_ERR_INTERNAL include an err_info string giving details.
That way, users won't just see "You got an internal error", the details
will be given, so they can report them in a bug.
Diffstat (limited to 'reordercap.c')
-rw-r--r-- | reordercap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/reordercap.c b/reordercap.c index 953bd27e4b..291bcb11be 100644 --- a/reordercap.c +++ b/reordercap.c @@ -264,15 +264,17 @@ main(int argc, char *argv[]) /* Open outfile (same filetype/encap as input file) */ if (strcmp(outfile, "-") == 0) { - pdh = wtap_dump_open_stdout(wtap_file_type_subtype(wth), WTAP_UNCOMPRESSED, ¶ms, &err); + pdh = wtap_dump_open_stdout(wtap_file_type_subtype(wth), + WTAP_UNCOMPRESSED, ¶ms, &err, &err_info); } else { - pdh = wtap_dump_open(outfile, wtap_file_type_subtype(wth), WTAP_UNCOMPRESSED, ¶ms, &err); + pdh = wtap_dump_open(outfile, wtap_file_type_subtype(wth), + WTAP_UNCOMPRESSED, ¶ms, &err, &err_info); } g_free(params.idb_inf); params.idb_inf = NULL; if (pdh == NULL) { - cfile_dump_open_failure_message("reordercap", outfile, err, + cfile_dump_open_failure_message("reordercap", outfile, err, err_info, wtap_file_type_subtype(wth)); wtap_dump_params_cleanup(¶ms); ret = OUTPUT_FILE_ERROR; @@ -341,8 +343,8 @@ main(int argc, char *argv[]) g_ptr_array_free(frames, TRUE); /* Close outfile */ - if (!wtap_dump_close(pdh, &err)) { - cfile_close_failure_message(outfile, err); + if (!wtap_dump_close(pdh, &err, &err_info)) { + cfile_close_failure_message(outfile, err, err_info); wtap_dump_params_cleanup(¶ms); ret = OUTPUT_FILE_ERROR; goto clean_exit; |