CPoint::Offset将值添加到CPoint的x和y成员。void Offset( int xOffset, int yOffset ) throw( );void Offset( POINT point ) throw( );void Offset( SIZE size ) ...
分类:
其他好文 时间:
2014-08-11 23:52:43
阅读次数:
304
Java中的异常类都继承自Trowable类。一个Throwable类的对象都可以抛出(throw)Throwable对象可以分为两组。一组是unchecked异常,异常处理机制往往不用于这组异常,包括:Error类通常是指Java的内部错误以及如资源耗尽的错误。当Error(及其衍生类)发生时,我...
分类:
编程语言 时间:
2014-08-08 08:26:25
阅读次数:
293
public Test() throws RepletException { try { System.out.println("Test this Project!") } catch (Exception e) { throw new Exception(e...
分类:
其他好文 时间:
2014-08-06 21:46:32
阅读次数:
196
在系统抛出异常处设置断点有时候我们的程序不知道跑到哪个地方就 crash 了,而 crash 又很难重现。保守的做法是在系统抛出异常之前设置断点,具体来说是在objc_exception_throw处设置断点。设置步骤为:首先在 XCode 按 CMD + 6,进入断点管理窗口;然后点击右下方的 +...
分类:
移动开发 时间:
2014-08-05 18:37:59
阅读次数:
264
一、图片的载入如果需要在界面上显示的是已经存在的图片,那么需要将待显示的图片载入至CImage对象之中,CImage提供了四个载入函数:HRESULT Load(LPCTSTR pszFileName) throw( );HRESULT Load(IStream* pStream) throw();...
分类:
其他好文 时间:
2014-08-05 13:26:59
阅读次数:
166
一.函数原型CString::GetBufferLPTSTR GetBuffer( int nMinBufLength );throw( CMemoryException );Return ValueAn LPTSTR pointer to the object’s (null-terminated...
分类:
其他好文 时间:
2014-08-05 10:56:49
阅读次数:
366
捕捉异常。
try{}
catch(Exception e)
{throw new Exception("发现异常");}
1、建议在写一段代码的时候,对一块内容进行异常捕捉,捕捉后,可以提交到外层,也可进行自己的处理。
比如写入数据库,写入日志,写入文本等。或者重新启动程序之类的处理。
2、建议一块一块进行捕捉,而不要整个代码捕捉一次,这样可以很明确知道出错在哪,方便调试。
3、另...
分类:
其他好文 时间:
2014-08-04 17:37:17
阅读次数:
223
五个关键字 和两个结构两个结构:1.ThrowableError表示错误Exception异常2.ExceptionRuntimeException(包括其子类)非RuntimeException(Checked异常)5个关键字:try, catch, finally, throws , throw...
分类:
编程语言 时间:
2014-08-01 18:32:32
阅读次数:
251
Java的异常处理是通过5个关键字来实现的:try,catch,throw,throws,finally。JB的在线帮助中对这几个关键字是这样解释的: Throws: Lists the exceptions a method could throw. Throw: Transfers co...
分类:
编程语言 时间:
2014-08-01 13:29:11
阅读次数:
271
1、继承Thread和实现Runnable的不同 先看下Thread类 start方法的源码 public synchronized void start() { if (started) throw new IllegalThreadStateExcepti...
分类:
编程语言 时间:
2014-07-31 15:53:56
阅读次数:
284