Try catch statements in C

前端 未结 13 1513
眼角桃花
眼角桃花 2020-11-27 10:06

I was thinking today about the try/catch blocks existent in another languages. Googled for a while this but with no result. From what I know, there is not such a thing as tr

13条回答
  •  野性不改
    2020-11-27 10:43

    If you're using C with Win32, you can leverage its Structured Exception Handling (SEH) to simulate try/catch.

    If you're using C in platforms that don't support setjmp() and longjmp(), have a look at this Exception Handling of pjsip library, it does provide its own implementation

提交回复
热议问题