How to use the @adonisjs/ace.handleError function in @adonisjs/ace

To help you get started, we’ve selected a few @adonisjs/ace examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adonisjs / adonis-framework / src / Ignitor / Ace.ts View on Github external
this._exitProcess(1)
      }
    })

    /**
     * Execute the command and handle commands errors gracefully.
     * We must never end the process when command is executed
     * successfully, since some commands may want long
     * running processes.
     */
    try {
      this._registerGlobalFlags(kernel)
      await this._hooks.exec('after', 'start')
      await kernel.handle(argv)
    } catch (error) {
      handleError(error)
      this._exitProcess(1)
    }
  }
}