#[non_exhaustive]pub enum DdsError {
Show 15 variants
BadParameter {
what: &'static str,
},
PreconditionNotMet {
reason: &'static str,
},
WireError {
message: String,
},
InconsistentPolicy {
what: &'static str,
},
TransportError {
label: &'static str,
},
OutOfResources {
what: &'static str,
},
Timeout,
Unsupported {
feature: &'static str,
},
NotAllowedBySecurity {
what: &'static str,
},
IllegalOperation {
what: &'static str,
},
ImmutablePolicy {
policy: &'static str,
},
AlreadyDeleted,
NoData,
Other {
reason: &'static str,
},
NotEnabled,
}Expand description
Fehler aus DCPS-Operationen. Halbwegs analog zum Spec-
ReturnCode_t-Enum; wir lassen allerdings RETCODE_OK weg
(stattdessen Result::Ok) und mergen BAD_PARAMETER +
PRECONDITION_NOT_MET wo die Unterscheidung nichts hilft.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadParameter
Ungueltiger Parameter (z.B. leerer Topic-Name).
PreconditionNotMet
Operation paesst nicht zum Entity-Zustand (z.B. write auf
einen DataWriter, dessen Participant beendet wurde).
WireError
Unterliegende Wire/CDR-Operation ist gefehlschlagen.
InconsistentPolicy
QoS-Policy-Set nicht konsistent. Beispiel: Reliability= Best-Effort + History=KeepAll ohne resource_limits — Spec §2.2.3 nennt einige inkompatible Kombinationen.
TransportError
Transport-Operation fehlgeschlagen.
OutOfResources
Resource-Limit erreicht (max_samples, max_instances, etc.).
Timeout
Timeout bei blockierender Operation (take_w_timeout, etc.).
Unsupported
Operation nicht implementiert in v1.2.
NotAllowedBySecurity
Operation durch Security-Policy untersagt — DDS-Security 1.2 §7.3.25, DCPS 1.4 §2.2.2.1.1 ReturnCode_t = NOT_ALLOWED_BY_SECURITY. Der Permissions-/Access-Plugin hat das Lesen/Schreiben auf einem geschuetzten Topic abgelehnt; der Caller darf nicht erfahren, welches Permissions-Detail die Ursache war (Information-Leak).
IllegalOperation
IllegalOperation — die Operation passt strukturell nicht
(z.B. write() auf einen DataReader). DCPS 1.4 §2.2.2.1.1
ReturnCode_t = ILLEGAL_OPERATION.
ImmutablePolicy
ImmutablePolicy — set_qos auf eine post-enable immutable QoS-
Policy. DCPS 1.4 §2.2.2.1.1 ReturnCode_t = IMMUTABLE_POLICY.
AlreadyDeleted
AlreadyDeleted — Operation auf einer geloeschten Entity.
DCPS 1.4 §2.2.2.1.1 ReturnCode_t = ALREADY_DELETED.
NoData
NoData — read/take ohne neue Samples. DCPS 1.4 §2.2.2.1.1
ReturnCode_t = NO_DATA. Wird in der Praxis oft als leerer
Sample-Vec zurueckgegeben statt als Error.
Other
Error — generischer, nicht-spezifischer Fehler. DCPS 1.4
§2.2.2.1.1 ReturnCode_t = ERROR. Letzte Wahl wenn keine
spezifischere Variante passt; vermeidet Information-Leak
gegenueber dem Caller.
NotEnabled
NotEnabled — Operation auf einer Entity, die noch nicht via
enable() aktiviert wurde. DCPS 1.4 §2.2.2.1.1 ReturnCode_t =
NOT_ENABLED. §2.1.2 — Entities sind nach create_* disabled
bis enable(); viele Ops MUESSEN dann NotEnabled liefern.
Implementations§
Trait Implementations§
Source§impl Error for DdsError
Available on crate feature std only.
impl Error for DdsError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()