Clover.NET coverage report - Coverage for s2container.net

Coverage timestamp: 2006年5月30日 11:21:29

File Stats: LOC: 103   Methods: 9
NCLOC: 65 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Framework.Exceptions\SRuntimeException.cs - 41.2% 55.6% 46.2%
coverage coverage
1   #region Copyright
2   /*
3   * Copyright 2005 the Seasar Foundation and the Others.
4   *
5   * Licensed under the Apache License, Version 2.0 (the "License");
6   * you may not use this file except in compliance with the License.
7   * You may obtain a copy of the License at
8   *
9   * http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14   * either express or implied. See the License for the specific language
15   * governing permissions and limitations under the License.
16   */
17   #endregion
18  
19   using System;
20   using System.Runtime.Serialization;
21   using Seasar.Framework.Message;
22  
23   namespace Seasar.Framework.Exceptions
24   {
25   /// <summary>
26   /// Seasarの実行時例外のベースとなるクラスです。
27   /// メッセージコードによって例外を詳細に特定できます。
28   /// </summary>
29   [Serializable]
30   public class SRuntimeException : ApplicationException
31   {
32   private string messageCode_;
33   private object[] args_;
34   private string message_;
35   private string simpleMessage_;
36  
37 0 public SRuntimeException(string messageCode)
38   : this(messageCode,null,null)
39   {
40   }
41  
42  
43 607 public SRuntimeException(string messageCode,object[] args)
44   : this(messageCode,args,null)
45   {
46   }
47  
48  
49 611 public SRuntimeException(string messageCode,object[] args,System.Exception cause)
50   : base(messageCode,cause)
51   {
52 611 messageCode_ = messageCode;
53 611 args_ = args;
54 611 simpleMessage_ = MessageFormatter.GetSimpleMessage(messageCode_,args_);
55 611 message_ = "[" + messageCode + "]" + simpleMessage_;
56   }
57  
58 0 public SRuntimeException(SerializationInfo info, StreamingContext context )
59   : base( info, context )
60   {
61   this.messageCode_ = info.GetString("messageCode_");
62   this.args_ = info.GetValue("args_", typeof(object[])) as object[];
63   this.message_ = info.GetString("message_");
64   this.simpleMessage_ = info.GetString("simpleMessage_");
65   }
66  
67 0 public override void GetObjectData( SerializationInfo info,
68   StreamingContext context )
69   {
70   info.AddValue("messageCode_", this.messageCode_, typeof(String));
71   info.AddValue("args_", this.args_, typeof(object[]));
72   info.AddValue("message_", this.message_, typeof(String));
73   info.AddValue("simpleMessage_", this.simpleMessage_, typeof(String));
74  
75   base.GetObjectData(info, context);
76   }
77  
78  
79   public string MessageCode
80   {
81 1 get { return messageCode_; }
82   }
83  
84  
85   public object[] Args
86   {
87 2 get { return args_; }
88   }
89  
90   public override string Message
91   {
92 18 get { return message_; }
93   }
94  
95  
96 0 public string SimpleMessage
97   {
98   get { return simpleMessage_; }
99   }
100  
101   }
102   }
103