mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-09 20:48:53 +01:00
better error handling
This commit is contained in:
parent
7d24442984
commit
42df2253eb
@ -123,7 +123,7 @@ trexio_exit_code trexio_hdf5_init(trexio_t* const file) {
|
|||||||
f->$group$_group = H5Gcreate(f->file_id, $GROUP$_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
f->$group$_group = H5Gcreate(f->file_id, $GROUP$_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert (f->$group$_group > 0L);
|
if (f->$group$_group <= 0L) return TREXIO_INVALID_ID;
|
||||||
|
|
||||||
return TREXIO_SUCCESS;
|
return TREXIO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ trexio_exit_code trexio_text_flush_$group$(trexio_text_t* const file) {
|
|||||||
if ($group$->to_flush == 0) return TREXIO_SUCCESS;
|
if ($group$->to_flush == 0) return TREXIO_SUCCESS;
|
||||||
|
|
||||||
FILE* f = $group$->file;
|
FILE* f = $group$->file;
|
||||||
assert (f != NULL);
|
if (f == NULL) return TREXIO_INVALID_ARG_1;
|
||||||
fseek(f, 0L, SEEK_SET);
|
fseek(f, 0L, SEEK_SET);
|
||||||
|
|
||||||
/* Write the dimensioning variables */
|
/* Write the dimensioning variables */
|
||||||
|
Loading…
Reference in New Issue
Block a user