• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MorganKryze / ConsoleAppVisuals / 7465772104

09 Jan 2024 07:11PM UTC coverage: 12.896% (+0.8%) from 12.086%
7465772104

push

github

MorganKryze
✅ (visual) add attribute to ignore

216 of 1544 branches covered (0.0%)

Branch coverage included in aggregate %.

4 of 15 new or added lines in 5 files covered. (26.67%)

4 existing lines in 2 files now uncovered.

321 of 2620 relevant lines covered (12.25%)

22.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

9.09
/src/ConsoleAppVisuals/errors/EmptyFileException.cs
1
/*
2
    MIT License 2023 MorganKryze
3
    For full license information, please visit: https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/LICENSE
4
*/
5
namespace ConsoleAppVisuals;
6

7
/// <summary>
8
/// Exception thrown when no data is found in a file.
9
/// </summary>
10
/// <remarks>
11
/// For more information, refer to the following resources:
12
/// <list type="bullet">
13
/// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
14
/// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
15
/// </list>
16
/// </remarks>
17
[Serializable]
18
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
19
public class EmptyFileException : Exception, ISerializable
20
{
21
    /// <summary>
22
    /// Default constructor.
23
    /// </summary>
24
    public EmptyFileException() { }
×
25

26
    /// <summary>
27
    /// Constructor with message.
28
    /// </summary>
29
    /// <param name="message">Message to be displayed.</param>
30
    public EmptyFileException(string message)
31
        : base(message) { }
6✔
32

33
    /// <summary>
34
    /// Constructor with message and inner exception.
35
    /// </summary>
36
    /// <param name="message">Message to be displayed.</param>
37
    /// <param name="inner">Inner exception.</param>
38
    public EmptyFileException(string message, Exception inner)
39
        : base(message, inner) { }
×
40

41
    /// <summary>
42
    /// Serialization constructor.
43
    /// </summary>
44
    /// <param name="info">Serialization info.</param>
45
    /// <param name="context">Streaming context.</param>
46
    protected EmptyFileException(SerializationInfo info, StreamingContext context)
47
        : base(info, context) { }
×
48

49
    /// <summary>
50
    /// Get object data for serialization.
51
    /// </summary>
52
    /// <param name="info">Serialization info.</param>
53
    /// <param name="context">Streaming context.</param>
54
    /// <exception cref="ArgumentNullException"></exception>
55
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
56
    {
57
        if (info == null)
×
58
        {
59
            throw new ArgumentNullException(nameof(info));
×
60
        }
UNCOV
61
        base.GetObjectData(info, context);
×
UNCOV
62
    }
×
63

64
    private string GetDebuggerDisplay()
65
    {
66
        return ToString();
×
67
    }
68
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc