File: slow5_set_exit_condition.md

package info (click to toggle)
libslow5lib 0.7.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 25,084 kB
  • sloc: ansic: 11,825; python: 1,179; sh: 547; makefile: 90; cpp: 40
file content (49 lines) | stat: -rwxr-xr-x 1,145 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# slow5_set_exit_condition

## NAME

slow5_set_exit_condition - sets if slow5lib should exit the programme on error

## SYNOPSYS

`void slow5_set_exit_condition(enum slow5_exit_condition_opt exit_condition)`

## DESCRIPTION

`slow5_set_exit_condition()` sets the slow5lib to exit the programme on a circumstance as specified by *exit_condition*. *exit_condition* can be one of the following:

- `SLOW5_EXIT_OFF`: Do not exit the programme even if an error occur. The user should have done error handling for each function call which is typical library behaviour in C (default).
- `SLOW5_EXIT_ON_ERR`: Exit the programme if an error occurs (useful for debugging)
- `SLOW5_EXIT_ON_WARN`: Exit the programme if a warning occurs. This is a bit silly, but in case someone wants.

## RETURN VALUE

None.

## ERRORS

None.

## NOTES

Internally sets global variable. Intended to be set as the beginning of the programme.


## EXAMPLES

```
#include <stdio.h>
#include <stdlib.h>
#include <slow5/slow5.h>

int main(){

	slow5_set_exit_condition(SLOW5_EXIT_ON_ERR);

	//... do the rest

}
```

## SEE ALSO
[slow5_set_log_level()](slow5_set_log_level.md)