New tests.
[mono.git] / mcs / class / System.Web.Mvc2 / System.Web.Mvc / HandleErrorInfo.cs
1 /* ****************************************************************************\r
2  *\r
3  * Copyright (c) Microsoft Corporation. All rights reserved.\r
4  *\r
5  * This software is subject to the Microsoft Public License (Ms-PL). \r
6  * A copy of the license can be found in the license.htm file included \r
7  * in this distribution.\r
8  *\r
9  * You must not remove this notice, or any other, from this software.\r
10  *\r
11  * ***************************************************************************/\r
12 \r
13 namespace System.Web.Mvc {\r
14     using System;\r
15     using System.Web.Mvc.Resources;\r
16 \r
17     public class HandleErrorInfo {\r
18 \r
19         public HandleErrorInfo(Exception exception, string controllerName, string actionName) {\r
20             if (exception == null) {\r
21                 throw new ArgumentNullException("exception");\r
22             }\r
23             if (String.IsNullOrEmpty(controllerName)) {\r
24                 throw new ArgumentException(MvcResources.Common_NullOrEmpty, "controllerName");\r
25             }\r
26             if (string.IsNullOrEmpty(actionName)) {\r
27                 throw new ArgumentException(MvcResources.Common_NullOrEmpty, "actionName");\r
28             }\r
29 \r
30             Exception = exception;\r
31             ControllerName = controllerName;\r
32             ActionName = actionName;\r
33         }\r
34 \r
35         public string ActionName {\r
36             get;\r
37             private set;\r
38         }\r
39 \r
40         public string ControllerName {\r
41             get;\r
42             private set;\r
43         }\r
44 \r
45         public Exception Exception {\r
46             get;\r
47             private set;\r
48         }\r
49 \r
50     }\r
51 }\r