mirror of https://github.com/abpframework/abp.git
7 changed files with 104 additions and 37 deletions
@ -1,18 +1,36 @@ |
|||||
using Microsoft.AspNetCore.Mvc; |
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling |
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling |
||||
{ |
{ |
||||
public class ExceptionTestPage : AbpPageModel |
public class ExceptionTestPage : AbpPageModel |
||||
{ |
{ |
||||
public void OnGetUserFriendlyException1() |
public void OnGetUserFriendlyException_void() |
||||
{ |
{ |
||||
throw new UserFriendlyException("This is a sample exception!"); |
throw new UserFriendlyException("This is a sample exception!"); |
||||
} |
} |
||||
|
|
||||
public IActionResult OnGetUserFriendlyException2() |
public Task OnGetUserFriendlyException_Task() |
||||
|
{ |
||||
|
throw new UserFriendlyException("This is a sample exception!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public IActionResult OnGetUserFriendlyException_ActionResult() |
||||
{ |
{ |
||||
throw new UserFriendlyException("This is a sample exception!"); |
throw new UserFriendlyException("This is a sample exception!"); |
||||
} |
} |
||||
|
|
||||
|
public JsonResult OnGetUserFriendlyException_JsonResult() |
||||
|
{ |
||||
|
throw new UserFriendlyException("This is a sample exception!"); |
||||
|
} |
||||
|
|
||||
|
public Task<JsonResult> OnGetUserFriendlyException_Task_JsonResult() |
||||
|
{ |
||||
|
throw new UserFriendlyException("This is a sample exception!"); |
||||
|
} |
||||
|
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue