https://github.com/snaipe/tizzy
A C library dedicated to error handling and panicking.
https://github.com/snaipe/tizzy
Last synced: 2 months ago
JSON representation
A C library dedicated to error handling and panicking.
- Host: GitHub
- URL: https://github.com/snaipe/tizzy
- Owner: Snaipe
- License: mit
- Created: 2016-04-15T20:15:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-09T20:08:28.000Z (almost 9 years ago)
- Last Synced: 2025-03-26T05:11:13.382Z (3 months ago)
- Language: C
- Homepage:
- Size: 33.2 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tizzy
A C library dedicated to error handling and panicking.
**Warning:** This library is experimental. Use at your own risk.
Tizzy provides convenience functions to help application-writers panic
when everything goes wrong, and provide them useful diagnostics for debugging
purposes.## Example
```
$> cat -n panic.c1 #include
2
3 static void baz(void) {
4 tzy_panic("Something, somewhere, went horribly wrong.");
5 }
6
7 static void bar(void) {
8 baz();
9 }
10
11 static void foo(void) {
12 bar();
13 }
14
15 int main(void)
16 {
17 foo();
18 return 0;
19 }$> gcc -g -o panic panic.c -ltizzy
$> ./panic
panic: Something, somewhere, went horribly wrong.
- at baz(panic.c:4)
- at bar(panic.c:8)
- at foo(panic.c:12)
- at main(panic.c:17)
zsh: abort (core dumped) ./panic
```