创建异常类在颤动

代码示例

10
0

镖异常

try {
  breedMoreLlamas();
} on OutOfLlamasException {			// A specific exception  
  buyMoreLlamas();
} on Exception catch (e) { 			// Anything else that is an exception
  print('Unknown exception: $e');
} catch (e) {						// No specified type, handles all
  print('Something really unknown: $e');
} finally {							// Always clean up, even if case of exception
  cleanLlamaStalls();
}

类似页面

带有示例的类似页面

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................