Exemplo n.º 1
0
		public static void WriteException(IHttpContext context, HttpException ex)
		{
			WriteException(context, ex.Code, ex);
		}
		public static void WriteException(IHttpContext context, HttpException httpException)
		{
			var sd = "Unknown error";
			if (_respStatus.Contains(httpException.Code))
			{
				sd = (string)_respStatus[httpException.Code];
			}
			var errorModel = new ErrorDescriptor()
			{
				Exception = httpException,
				HttpCode = httpException.Code,
				ShortDescription = sd,
				LongDescription = httpException.Message,
				ServerType = "Node.Cs http module V." + Assembly.GetExecutingAssembly().GetName().Version
			};
			OutputException(errorModel, context);
		}