Exception Handling

One of the most important modules of the AUA framework is its error control module. This framework is perfect at error control and management. For example: When a user enters one of the actions, an expression occurs but the error page does not displayed and the error text is displayed as a controlled message and the URL does not change. Anywhere we want to interrupt request processing a request, we can throw an Exception and interrupt the process, in which case the error is sent to the error control module.


If the user is not logged in, the request processing should be stopped and an error will be displayed.


                
public IActionResult Index()
{

    if(CurrentUser is null)
    throw new ClientException("Custom Error Exception");

}
    
public IActionResult Index()
{

    if(CurrentUser is null)
    throw new ClientException("Custom Error Exception");

}


Exception Handling in youtube More videos

Exception Handling in youtube More videos