Skip to content

Commit

Permalink
Provide stl_get_error_function
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Jul 9, 2014
1 parent a024d7b commit c10b43c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/stl.h
Expand Up @@ -186,6 +186,7 @@ extern void stl_add_facet(stl_file *stl, stl_facet *new_facet);
extern void stl_get_size(stl_file *stl);

extern void stl_clear_error(stl_file *stl);
extern int stl_get_error(stl_file *stl);
extern void stl_exit_on_error(stl_file *stl);

#ifdef __cplusplus
Expand Down
5 changes: 5 additions & 0 deletions src/stl_io.c
Expand Up @@ -468,3 +468,8 @@ stl_exit_on_error(stl_file *stl) {
stl_close(stl);
exit(1);
}

int
stl_get_error(stl_file *stl) {
return stl->error;
}

0 comments on commit c10b43c

Please sign in to comment.