UNPKG

navidev-adt-api

Version:

API de conexión al Abap Developer Tools

72 lines 3.29 kB
import { HttpClientResponse } from "../httpClient/httpClient"; export interface ExceptionProperties { conflictText: string; ideUser: string; "com.sap.adt.communicationFramework.subType": string; "T100KEY-ID": string; "T100KEY-NO": string; } export declare const ADTEXTYPEID: unique symbol; export declare const CSRFEXTYPEID: unique symbol; export declare const HTTPTYPEID: unique symbol; export declare const NATIVETYPEID: unique symbol; export declare const GENERALTYPEID: unique symbol; export declare const AUTHTYPEID: unique symbol; export default class AdtException extends Error { readonly err: number; readonly properties: ExceptionProperties | Record<string, string>; readonly type: string; readonly message: string; readonly parent?: Error | undefined; readonly namespace?: string | undefined; readonly localizedMessage?: string | undefined; readonly response?: HttpClientResponse | undefined; readonly typeID?: symbol | undefined; /** * Crea una excepción de tipo ADT * @param errOrResponse | Numero de mensaje o respuesta HTTP * @param properties | Propiedades * @param type | Tipo * @param message | Mensaje * @param parent | Error padre * @param namespace | Namespace * @param localizedMessage | Mensaje localizado * @param response | Respuesta del servicio * @param typeID | ID interno del tipo de excepción * @returns Excepción */ static create(errOrResponse: number | HttpClientResponse, properties: ExceptionProperties | Record<string, string>, type?: string, message?: string, parent?: Error, namespace?: string, localizedMessage?: string, response?: HttpClientResponse, typeID?: symbol): AdtException; /** * Generación error de tipo CSRFC * @param message | Mensaje * @param parent | Error padre * @returns Excepción */ static createCsrfError(message: string, response?: HttpClientResponse, parent?: Error): AdtException; /** * Creación simple de una excepción * @param message * @returns Excepción */ static simpleError(number: number | undefined, message: string, typeID?: symbol): AdtException; /** * Error nativo * @param err | Numero de error por defecto 500 * @param message | Mensaje * @param parent | Objeto del error * @returns Excepción */ static nativeError(err: number | undefined, message: string, parent?: Error): AdtException; /** * Error general para casos desconocidos o excepciones raras * @param err | Numero de mensake * @param type | Tipo * @param message | Mensaje * @param parent | Error padre * @returns Excepción */ static generalError(err: number | undefined, type: string | undefined, message: string, parent?: Error): AdtException; static authError(err: number, message: string, response: HttpClientResponse): AdtException; constructor(err: number, properties: ExceptionProperties | Record<string, string>, type: string, message: string, parent?: Error | undefined, namespace?: string | undefined, localizedMessage?: string | undefined, response?: HttpClientResponse | undefined, typeID?: symbol | undefined); } //# sourceMappingURL=adtException.d.ts.map