diff --git a/packages/seacas/libraries/exodus/include/exodusII.h b/packages/seacas/libraries/exodus/include/exodusII.h index 90784f0b34..d3511618e9 100644 --- a/packages/seacas/libraries/exodus/include/exodusII.h +++ b/packages/seacas/libraries/exodus/include/exodusII.h @@ -1955,9 +1955,9 @@ enum ex_error_return_code { EX_LASTERR = -1003, /**< in ex_err, use existing err_num value */ EX_NULLENTITY = -1006, /**< null entity found */ EX_NOENTITY = -1007, /**< no entities of that type on database */ + EX_NOTFOUND = -1008, /**< could not find requested variable on database */ EX_INTSIZEMISMATCH = - -1008, /**< integer sizes do not match on input/output databases in ex_copy */ - EX_NOTFOUND = -1008, /**< could not find requested variable on database */ + -1009, /**< integer sizes do not match on input/output databases in ex_copy */ EX_FATAL = -1, /**< fatal error flag def */ EX_NOERR = 0, /**< no error flag def */ diff --git a/packages/seacas/libraries/exodus/src/ex_err.c b/packages/seacas/libraries/exodus/src/ex_err.c index a2400ab978..99f2429b1f 100644 --- a/packages/seacas/libraries/exodus/src/ex_err.c +++ b/packages/seacas/libraries/exodus/src/ex_err.c @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with * NTESS, the U.S. Government retains certain rights in this software. * @@ -345,6 +345,7 @@ const char *ex_strerror(int err_num) case EX_INTERNAL: return "Internal logic error in exodus library."; case EX_NOTROOTID: return "File id is not the root id; it is a subgroup id."; case EX_NULLENTITY: return "Null entity found."; + case EX_NOTFOUND: return "Could not find requested variable on database."; case EX_INTSIZEMISMATCH: return "Integer sizes must match for input and output file in ex_copy."; case EX_MSG: return "Message printed; no error implied."; default: return nc_strerror(err_num); diff --git a/packages/seacas/libraries/exodus/src/ex_utils.c b/packages/seacas/libraries/exodus/src/ex_utils.c index a95f844529..7513e665c5 100644 --- a/packages/seacas/libraries/exodus/src/ex_utils.c +++ b/packages/seacas/libraries/exodus/src/ex_utils.c @@ -193,7 +193,7 @@ int exi_check_file_type(const char *path, int *type) FILE *fp; if (!(fp = fopen(path, "r"))) { char errmsg[MAX_ERR_LENGTH]; - snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Could not open file '%s', error = %s.", path, + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Could not open file '%s',\n\t\terror = %s.", path, strerror(errno)); ex_err(__func__, errmsg, EX_WRONGFILETYPE); EX_FUNC_LEAVE(EX_FATAL); @@ -203,8 +203,9 @@ int exi_check_file_type(const char *path, int *type) fclose(fp); if (i != MAGIC_NUMBER_LEN) { char errmsg[MAX_ERR_LENGTH]; - snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Could not read magic data from file '%s', err = %s.", - path, strerror(errno)); + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Could not read magic data from file '%s',\n\t\terror = %s.", path, + strerror(errno)); ex_err(__func__, errmsg, EX_WRONGFILETYPE); EX_FUNC_LEAVE(EX_FATAL); }