electron-egg electron-egg
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
❤️成为赞助商
  • 教程

  • ee-bin

  • ee-core

    • app
    • config
    • const
    • controller
    • core
    • cross
    • electron
    • electron/app
    • electron/window
    • exception
      • jobs
      • jobs/ChildJob
      • jobs/ChildPoolJob
      • loader
      • log
      • message
      • message/childMessage
      • ps
      • socket
      • storage
      • storage/sqlite
      • utils
      • utils/helper
      • utils/is
      • utils/json
      • utils/ip
      • utils/get-port
    • ee-go

    目录

    exception

    # 介绍

    捕获异常模块。主进程和childJob功能已经启用。

    # 使用方法

    const {   
      loadException,
      uncaughtExceptionHandler,
      unhandledRejectionHandler,
      uncaughtExceptionMonitorHandler
    } = require('ee-core/exception');
    

    # API列表

    # loadException()

    开启异常捕获。会同时调用 uncaughtExceptionHandler() / unhandledRejectionHandler()

    loadException();
    

    # uncaughtExceptionHandler()

    当进程上抛出异常而没有被捕获时触发该事件,并且使异常静默

    # unhandledRejectionHandler()

    当promise中reject的异常在同步任务中没有使用catch捕获就会触发该事件,即便是在异步情况下使用了catch也会触发该事件。

    上次更新: 2025/06/06, 07:21:49
    electron/window
    jobs

    ← electron/window jobs→

    Theme by Vdoing | Copyright © 2023-2025 哆啦好梦 | 京ICP备15041380号-2
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式
    ×