# riscv: add a custom panic function · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/685f8282180016ac8d82ecf2fe7facc1a2d6b9f7)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 685f8282180016ac8d82ecf2fe7facc1a2d6b9f7

Requested commit: 685f8282180016ac8d82ecf2fe7facc1a2d6b9f7

Commit: 685f8282180016ac8d82ecf2fe7facc1a2d6b9f7

Tree: 620d40ac62344a8e0bf97274b60d28ed7daa0da7

Author: David Rubin

Committer: David Rubin

## Message

```
riscv: add a custom panic function

this provides a much better indication of when we are having a controlled panic with an error message
or when we are actually segfaulting, as before the `trap` as causing a segfault.

```

## Parents

- [b28c966e332623dc43b1481b34016d18ce3262fa](https://git.cafe/gitcafe/zig/commit/b28c966e332623dc43b1481b34016d18ce3262fa?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/685f8282180016ac8d82ecf2fe7facc1a2d6b9f7?format=markdown)
