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

deavmi / doap / #221

01 Oct 2023 04:15PM UTC coverage: 69.088% (-6.1%) from 75.192%
#221

Pull #5

coveralls-ruby

deavmi
Merge branch 'master' into feature/retransmission
Pull Request #5: Retransmission support

44 of 44 new or added lines in 2 files covered. (100.0%)

371 of 537 relevant lines covered (69.09%)

2.13 hits per line

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

0.0
/source/doap/client/exceptions.d
1
module doap.client.exceptions;
2

3
import doap.exceptions : CoapException;
4
import core.time : Duration;
5

6
public class CoapClientException : CoapException
7
{
8
    this(string msg)
×
9
    {
10
        super(msg);
×
11
    }
12
}
13

14
import doap.client.request : CoapRequestFuture;
15
import std.conv : to;
16

17
/** 
18
 * Thrown when a `CoapRequestFuture` has
19
 * a `get(Duration)` call timeout
20
 */
21
public final class RequestTimeoutException : CoapClientException
22
{
23
    /** 
24
     * The future we timed out on
25
     */
26
    private CoapRequestFuture future;
27

28
    /**
29
     * Timeout time
30
     */
31
    private Duration timeout;
32

33
    /** 
34
     * Constructs a new timeout exception for
35
     * the given future which timed out
36
     *
37
     * Params:
38
     *   future = the future we timed out on
39
     *   timeout = the time duration timed out
40
     * on
41
     */
42
    package this(CoapRequestFuture future, Duration timeout)
×
43
    {
44
        super("Timed out whilst waiting for "~to!(string)(future)~" after "~to!(string)(timeout));
×
45
        this.future = future;
×
46
        this.timeout = timeout;
×
47
    }
48

49
    /** 
50
     * Returns the future request which timed
51
     * out and cause dthis exception to throw
52
     * in the first place
53
     *
54
     * Returns: the `CoapRequestFuture`
55
     */
56
    public CoapRequestFuture getFuture()
57
    {
58
        return this.future;
×
59
    }
60

61
    /** 
62
     * Returns the timeout period which 
63
     * was exceeded
64
     *
65
     * Returns: the `Duration`
66
     */
67
    public Duration getTimeout()
68
    {
69
        return this.timeout;
×
70
    }
71
}
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