在C中没有C ++的异常处理在Linux中 [英] Exception Handling in C without C++ in Linux

查看:136
本文介绍了在C中没有C ++的异常处理在Linux中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Linux是否在C中提供异常处理,而不使用C ++?或者,实现这种异常处理最好的办法是什么?目标是避免为所有调用的函数检查返回码,但是做一些类似C ++的线程安全和便于携带。

解决方案

我从来没有听说过Linux提供这样的东西,但是这个页面描述了C的第三方异常处理库: http://www.on-time.com/ddj0011.htm 尽管如此,我还没有找到下载链接。


Does Linux provide an exception handling in C without resorting to C++? Or, what might be the best way to implement such an exception handling? The goal is to avoid to check return codes for every function called, but do something like in C++ that is thread safe and easily portable.

解决方案

I've never heard of Linux providing anything like that, but this page describes a third-party exception handling library for C: http://www.on-time.com/ddj0011.htm I haven't been able to find the download link, though.

这篇关于在C中没有C ++的异常处理在Linux中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆