-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCanOpenTransportException.cs
More file actions
24 lines (21 loc) · 1.18 KB
/
Copy pathCanOpenTransportException.cs
File metadata and controls
24 lines (21 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using CanKit.Core.Exceptions;
namespace CanKit.Pro.CANopen;
/// <summary>
/// Raised when a CANopen frame could not be handed off to the bus (L2 rejection, bus-off, or
/// TX confirmation timeout). Surfaces through the node's
/// <c>BackgroundExceptionOccurred</c> event rather than any single caller — the CANopen wire
/// protocols (SYNC / heartbeat / PDO / EMCY) are fire-and-forget from an application caller's
/// perspective, so there is no single request task to fail. Derives from
/// <see cref="CanKitException"/> so L2/L3/L4 failures can be caught uniformly across the
/// library (NFR-006 error architecture, arc42 ADR-12).
/// </summary>
public sealed class CanOpenTransportException : CanKitException
{
/// <summary>Constructs a new exception with the given <paramref name="message"/>.</summary>
public CanOpenTransportException(string message)
: base(CanKitErrorCode.TransportOperationFailed, message) { }
/// <summary>Constructs a new exception wrapping <paramref name="inner"/>.</summary>
public CanOpenTransportException(string message, Exception inner)
: base(CanKitErrorCode.TransportOperationFailed, message, innerException: inner) { }
}