JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

Dart try on catch

发布时间 2023-12-30 23:16:35作者: sqmw

Dart

try catch on finally

void main() {
  int a = 12;
  int b = 0;
  int res;
  try {
    res = a ~/ b;
  } on UnsupportedError { // it is used as we know waht error will occur
    print('Cannot divide by zero');
  } catch (ex) {
    print(ex);
  } finally {
    print('Finally block always executed');
  }
}
    本栏目推荐文章
  • 2024-01-13 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. ==》引用了未使用的方法导致
  • Spark On YARN架构
  • mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; ERROR 1410 (42000): You are not allowed to create a user with GRANT
  • Spark on YARN的两种部署模式
  • redis报错MISCONF Errors writing to the AOF file: No space left on device,磁盘满无法写入数据报错
  • Early lameness detection in dairy cattle based on wearable gait analysis using semi-supervised LSTM-Autoencoder
  • 基于正则化的图自编码器在推荐算法中的应用 Application of graph auto-encoders based on regularization in recommendation algorithms
  • scp 出现 subsystem request failed on channel 0 scp: Connection closed 的解决方法
  • Docker 数据库连接见解异常 SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again
  • Spark - spark on yarn 的作业提交流程
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们