summaryrefslogtreecommitdiff
path: root/BCT/Samples/CodeCounter/library/CustomExceptions.cs
blob: b4ee710059151a395714b134a1452f27ad49fa9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 ******************************************************************************
 This file is part of BigWoo.NET.

    BigWoo.NET is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    BigWoo.NET is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with BigWoo.NET; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


    architected and written by 
    matt raffel 
    matt.raffel@mindspring.com

   copyright (c) 2008 by matt raffel unless noted otherwise

 ******************************************************************************
*/
#region using statements
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.IO;
#endregion


namespace CodeCounter.Library
{
    /// <summary>
    /// 
    /// </summary>
    public class ConfigurationFileException : Exception
    {
        public ConfigurationFileException(string msg) : base(msg) { }
    }

    /// <summary>
    /// 
    /// </summary>
    public class FileTypeNotSupportedException : Exception
    {
        public FileTypeNotSupportedException(string msg) : base(msg) { }

        public static FileTypeNotSupportedException CreateException(FileInfo info)
        {
            string msg = string.Format("{0} was not counted as no implemention for type {1} was found", info.Name, info.Extension);
            return new FileTypeNotSupportedException(msg);
        }
    }
}