all files / src/utils/ standard-http-exception.utils.ts

53.33% Statements 16/30
100% Branches 0/0
6.67% Functions 1/15
51.72% Lines 15/29
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130                      1×                                 1×               1×               1×               1×               1×               1×               1×               1×               1×               1×               1×               1×               1×       1×  
/*********************************************************************************************************************************
 This class has been automatically generated using KLTT-APIRestGenerator project, don't do manual file modifications.
 Thu Jul 19 12:37:49 CEST 2018
 
 "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
  and to You under the Apache License, Version 2.0. "
**********************************************************************************************************************************/
 
/**
 * This class is the standard HTTP exception to handle this type of errors
 */
export class StandardHttpException
{
	error    : string ;
	message  : string ;
	exception: string ;
	path     : string ;
	timestamp: number ;
 
    /**
	 * Public constructor
	 * @param status with the status code
	 */
	constructor(public status: number) { }
	
	/**
	 * @param status the status to set
	 */
	setStatus(status)
	{
		this.status = status ;
	}
	
	/**
	 * @return the status
	 */
	getStatus()
	{
		return this.status ;
	}
	
	/**
	 * @param error the error to set
	 */
	setError(error)
	{
		this.error = error ;
	}
	
	/**
	 * @return the error
	 */
	getError()
	{
		return this.error ;
	}
	
	/**
	 * @param message the message to set
	 */
	setMessage(message)
	{
		this.message = message ;
	}
	
	/**
	 * @return the message
	 */
	getMessage()
	{
		return this.message ;
	}
	
	/**
	 * @param exception the exception to set
	 */
	setException(exception)
	{
		this.exception = exception ;
	}
	
	/**
	 * @return the exception
	 */
	getException()
	{
		return this.exception ;
	}
	
	/**
	 * @param path the path to set
	 */
	setPath(path)
	{
		this.path = path ;
	}
	
	/**
	 * @return the path
	 */
	getPath()
	{
		return this.path ;
	}
	
	/**
	 * @param timestamp the timestamp to set
	 */
	setTimestamp(timestamp)
	{
		this.timestamp = timestamp ;
	}
	
	/**
	 * @return the timestamp
	 */
	getTimestamp()
	{
		return this.timestamp ;
	}
	
	/**
	 * @return the object as string
	 */
	toString()
	{
		return JSON.stringify(this, null, 4) ;
	}
};