~philip-peitsch/ngineer/trunk

« back to all changes in this revision

Viewing changes to NGineer/Exceptions/DepthExceededException.cs

  • Committer: Philip Peitsch
  • Date: 2010-11-25 11:43:27 UTC
  • Revision ID: philip.peitsch@gmail.com-20101125114327-yfnqrkhye88egszy
All exceptions now pass on the current session

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
using System;
2
2
using System.Text;
3
 
using NGineer.Utils;
4
3
 
5
4
namespace NGineer.Exceptions
6
5
{
7
6
    public class DepthExceededException : BuilderException
8
7
    {
9
8
        private readonly int _depth;
10
 
        private readonly BuildSession _session;
11
9
 
12
10
        public DepthExceededException(int depth, BuildSession session)
13
 
            : base(string.Format("Maximum build depth of {0} was exceeded: {1}", depth, session.ConstructedChainInfo()))
 
11
            : base(string.Format("Maximum build depth of {0} was exceeded", depth), session)
14
12
        {
15
13
            _depth = depth;
16
 
            _session = session;
17
14
        }
18
15
 
19
16
        public int Depth
20
17
        {
21
18
            get { return _depth; }
22
19
        }
23
 
 
24
 
        public BuildSession Session
25
 
        {
26
 
            get { return _session; }
27
 
        }
28
20
    }
29
21
}
 
 
b'\\ No newline at end of file'