UNPKG

mp-holistic

Version:

si prefigge l'umile compito di aiutare nella creazione di : - un server API REST mediante express - un semplice ORM per Postgres Questo tramite decoratori o classi particolari.

27 lines (22 loc) 798 B
import { IErroreMio } from "./utility"; export class ErroreMio extends Error { codiceErrore: number; percorsoErrore?: string; nomeClasse?: string; nomeFunzione?: string; constructor(item: IErroreMio) { super(item.messaggio); this.codiceErrore = item.codiceErrore; if (item.percorsoErrore) { this.percorsoErrore = item.percorsoErrore; } if (item.nomeClasse) { this.nomeClasse = item.nomeClasse; this.percorsoErrore = this.percorsoErrore + '_CLASSE_->' + this.nomeClasse } if (item.nomeFunzione) { this.nomeFunzione = item.nomeFunzione; this.percorsoErrore = this.percorsoErrore + '_FUNZIONE_->' + this.nomeFunzione } } }