exception throw
常見例句
- If the criterion is not met you can raise an exception using the Throw node.
如果不滿足條件,您可以使用 Throw 節(jié)點引發(fā)一個異常。 - To deal with this, you can generate a stack trace in the constructor of the exception object during the throw exception statement.
為了解決這一問題,可以在拋出異常語句期間,在異常對象的構造函數(shù)中生成一個堆棧跟蹤。 - When determining what type of exception to throw, you should always first consider the tier that will handle the reported exception.
當決定拋出何種類型的異常時,您應該總是首先考慮將要處理所報告異常的層。 - The format is the same. I'm going to ask for some input, and then I am going to use that procedure to check, is this the right type of value. And I'm trying to use that to do the coercion if you like. Same thing if it works, I'm going to skip that, if it not, it's going to throw the exception.
格式是一樣的,我需要一些輸入,然后我要用一個過程來檢查,是否是正確的值,然后你就可以做強制轉(zhuǎn)換了,如果能運行,那是一樣的,我打算跳過這段,如果不正確,那就會拋出一個異常。
麻省理工公開課 - 計算機科學及編程導論課程節(jié)選 - The NSTextAlignmentNatural value is unsupported and will throw an exception when used with the textAlignment property of UILabel or supplied as the alignment parameter to the drawInRect:withFont:lineBreakMode:alignment: method of NSString.
ENGADGET: Apple seeds iOS 6 beta 4 to developers: here's the changelog 返回 exception throw