Document BaseException

This commit is contained in:
Kegan Myers 2014-02-28 10:37:09 -06:00
parent c3b09a8c0d
commit d15b8a9149

View file

@ -1,23 +1,51 @@
/**
* @module Typertext
* @submodule Http
* @submodule Json
*/
module Typertext { module Typertext {
export class BaseException<T> { export class BaseException<T> {
private code:number; private code:number;
private custom:T; private custom:T;
private message:string; private message:string;
/**
* A simple utility class to provide a defined way to pass exceptions occurring within Typertext
*
* @param {string} message
* @param {number} code
* @param {T} custom
* @constructor
*/
constructor(message:string, code:number, custom:T) { constructor(message:string, code:number, custom:T) {
this.message = message; this.message = message;
this.code = code; this.code = code;
this.custom = custom; this.custom = custom;
} }
/**
* Accessor method
*
* @returns {number}
*/
public GetCode():number { public GetCode():number {
return this.code; return this.code;
} }
/**
* Accessor method
*
* @returns {string}
*/
public GetMessage():string { public GetMessage():string {
return this.message; return this.message;
} }
/**
* Accessor method
*
* @returns {T}
*/
public GetCustom():T { public GetCustom():T {
return this.custom; return this.custom;
} }