Show / Hide Table of Contents

Class ExceptionsHandler

Handler to add global exception handling, specifically we do the following:

  1. Log the exception
  2. Writte a propper ApiResponse<TData> object.
Inheritance
System.Object
ExceptionsHandler
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Celerik.NetCore.Web
Assembly: cs.temp.dll.dll
Syntax
public static class ExceptionsHandler

Methods

UseExceptionsHandler(IApplicationBuilder, ILogger)

Adds global exception habling by logging the exception and writting a propper ApiResponse<TData> object.

Declaration
public static void UseExceptionsHandler(this IApplicationBuilder app, ILogger logSvc)
Parameters
Type Name Description
IApplicationBuilder app

Defines a class that provides the mechanisms to configure an application's request pipeline.

ILogger logSvc

Reference to the current ILogService intance.

In This Article
Back to top Generated by DocFX