Chinaunix首页 | 论坛 | 博客
  • 博客访问: 516934
  • 博文数量: 135
  • 博客积分: 3568
  • 博客等级: 中校
  • 技术积分: 1942
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-19 17:52
文章分类

全部博文(135)

文章存档

2012年(29)

2011年(41)

2010年(26)

2009年(12)

2008年(9)

2007年(12)

2006年(6)

分类: C/C++

2010-06-30 11:01:04

好久没有用到C/C++了,接触到的项目大部分是JavaEE的。现在要做一个5个人,2个月的Linux C项目,用于拆分一些数据文件,进行检查、变换,最后再合并,然后更新数据库。
C啊,只在学校中学过,没做过项目,但自负在学校中学得比较扎实。但距离学C都4、5年了,还得花点时间再捡一捡呢。
C中没有像Java那样的try...catch...finally语法,但是可以找一些类似框架嘛!

找到了以下一些名称的框架:

exc-1.0.tar.gz
   有些年久失修的样子呢,找不到正式的出处,从一堆FTP上下载过来的。貌似功能很强的样子。


cexcept-2-0-1.zip
   貌似是最近两年才作的,功能上感觉有些不够强劲,看看其中的这个文件吧:rationale
Questions answered below:
* Why aren't multiple Catch clauses allowed?
* Why can't I say Catch (int e) like in C++ or Java?
* Why can't I jump into or out of a Try clause?
* Why isn't a Finally clause supported?
* Why can't I use Throw without an expression to re-throw an exception?
* Why can't "real" exceptions be caught?
* Why must the Catch expression have the same type that was passed to
define_exception_type()? I can assign a double value to an int, so
why can't I catch a double exception in an int variable?
* Why does the implementation copy the exception twice?
* Why are the macros spelled Try, Catch, Throw rather than...?
rtfex.h
  这个貌似是从MTK平台的非公开代码,受版权保护,可以学习,但用来开发麻,,,呵呵。。。

exceptions.h
  出处无名,见到的,就拷贝一份做个备份而已。


现在只是搜到这么几个候选资源,前2者中二选一的可能性比较大。后两者因为都是从网页上考下来的,且一个不公开,仅仅建议用作自己开发类似框架的参考。

打包下载:(注意,下载后清将后缀改为 .rar )
http://blogimg.chinaunix.net/blog/upfile2/100630092837.png


阅读(870) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~