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

neon-sunset / U8String / 5944730408

22 Aug 2023 10:34PM UTC coverage: 24.144% (+0.2%) from 23.927%
5944730408

push

github

neon-sunset
perf: fix split enumerator regressions

155 of 822 branches covered (18.86%)

Branch coverage included in aggregate %.

29 of 29 new or added lines in 4 files covered. (100.0%)

501 of 1895 relevant lines covered (26.44%)

43505.47 hits per line

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

0.0
/src/ThrowHelpers.cs
1
using System.Diagnostics;
2
using System.Diagnostics.CodeAnalysis;
3

4
namespace System;
5

6
// TODO: Author exception messages
7
internal static class ThrowHelpers
8
{
9
    [DoesNotReturn, StackTraceHidden]
10
    internal static void InvalidUtf8()
11
    {
12
        // TODO: Better exception message?
13
        throw new FormatException("The value is not a valid UTF-8 sequence.");
×
14
    }
15

16
    [DoesNotReturn, StackTraceHidden]
17
    internal static void InvalidAscii()
18
    {
19
        throw new FormatException("The value is not a valid ASCII sequence.");
×
20
    }
21

22
    [DoesNotReturn, StackTraceHidden]
23
    internal static void InvalidSplit()
24
    {
25
        throw new FormatException("The value is not a valid split sequence.");
×
26
    }
27

28
    [DoesNotReturn, StackTraceHidden]
29
    internal static void IndexOutOfRange()
30
    {
31
        throw new IndexOutOfRangeException();
×
32
    }
33

34
    [DoesNotReturn, StackTraceHidden]
35
    internal static void ArgumentOutOfRange()
36
    {
37
        throw new ArgumentOutOfRangeException();
×
38
    }
39

40
    [DoesNotReturn, StackTraceHidden]
41
    internal static void ArgumentOutOfRange(string? paramName)
42
    {
43
        throw new ArgumentOutOfRangeException(paramName);
×
44
    }
45

46
    [DoesNotReturn, StackTraceHidden]
47
    internal static T ArgumentOutOfRange<T>(string? paramName = null)
48
    {
49
        throw new ArgumentOutOfRangeException(paramName);
×
50
    }
51

52
    [DoesNotReturn, StackTraceHidden]
53
    internal static void Unreachable(
54
        [CallerFilePath] string? path = null,
55
        [CallerLineNumber] int line = 0)
56
    {
57
        throw new InvalidOperationException($"Unreachable code reached at {path}:{line}.");
×
58
    }
59

60
    [DoesNotReturn, StackTraceHidden]
61
    internal static T Unreachable<T>(
62
        [CallerFilePath] string? path = null,
63
        [CallerLineNumber] int line = 0)
64
    {
65
        throw new InvalidOperationException($"Unreachable code reached at {path}:{line}.");
×
66
    }
67
}
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

© 2026 Coveralls, Inc