Lund-Org/cherry

View on GitHub
src/orm/ORMException.js

Summary

Maintainability
A
0 mins
Test Coverage
const CherryError = require('../abstract/CherryError')

class ORMException extends CherryError {
  constructor (exception, code, data) {
    super(exception.message)
    this.code = code
    this.data = data
    this.stack = exception.stack
  }

  /**
   * To retrieve the options at the moment of the error
   */
  getDataTrace () {
    return this.data
  }
}

module.exports = ORMException