27 lines
666 B
C#
27 lines
666 B
C#
using System;
|
|
using System.Diagnostics;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Website.ViewModels;
|
|
|
|
namespace Website.Controllers
|
|
{
|
|
public class ErrorController : Controller
|
|
{
|
|
|
|
public IActionResult BlowUp() {
|
|
throw new Exception();
|
|
}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult ServerError()
|
|
{
|
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult PageNotFound()
|
|
{
|
|
return View();
|
|
}
|
|
}
|
|
}
|