pub enum CaError {
Show 24 variants
Io(Error),
Timeout,
ChannelNotFound(String),
Protocol(String),
UnsupportedType(u16),
WriteFailed(u32),
FieldNotFound(String),
ReadOnlyField(String),
TypeMismatch(String),
InvalidValue(String),
BadField(String),
BadChoice(String),
BadDbrType(String),
PutDisabled(String),
LinkError(String),
DbParseError {
line: usize,
column: usize,
message: String,
},
CalcError(String),
Disconnected,
Shutdown,
PutCallbackInProgress(String),
ServerError(u32),
TooLarge,
BadCount,
GetConvertFailed(String),
}Variants§
Io(Error)
Timeout
ChannelNotFound(String)
Protocol(String)
UnsupportedType(u16)
WriteFailed(u32)
FieldNotFound(String)
ReadOnlyField(String)
TypeMismatch(String)
InvalidValue(String)
BadField(String)
C S_db_badField (“Illegal RECORD FIELD”) — a record’s special()
refused the value that dbPut had already stored, e.g.
calcRecord.c:146-151 returning it for an uncompilable CALC. The
value stays written, the field’s monitor is not posted, the record is
not processed, and the status propagates to the client (rsrv
write_action → ECA_PUTFAIL).
BadChoice(String)
C S_db_badChoice (“Illegal choice”) — a DBR_STRING write to a
DBF_MENU field named neither an exact choice label nor an in-range
index (dbConvert.c::putStringMenu:1216-1229). C’s converter returns
this from inside dbPut, before the value is stored
(dbAccess.c:1362), so the field keeps its old value, no monitor is
posted and the record is not processed.
BadDbrType(String)
C S_db_badDbrtype (“Illegal Database Request Type”) — dbPut
refusing a put to a DBF link field (field_type > DBF_DEVICE,
dbAccess.c:1340-1347). Only dbPutField changes link fields, by
routing them through dbPutFieldLink (dbAccess.c:1261-1262); a
dbPut reached from a record’s OUT link (dbPutLink →
dbDbPutValue) or from internal code refuses, so a DB link cannot
silently rewire another record’s link field. rsrv answers it with
ECA_PUTFAIL like every non-zero put status (to_eca_status’s
catch-all).
PutDisabled(String)
LinkError(String)
DbParseError
CalcError(String)
Disconnected
Shutdown
PutCallbackInProgress(String)
CA WRITE_NOTIFY arrived while a previous async put on the same
record is still in flight. Mirrors C EPICS S_db_Blocked; the
CA server replies ECA_PUTCBINPROG.
ServerError(u32)
Server-emitted ECA status carried out-of-band on an otherwise
data-shaped frame — used by libca cac::eventAddRespAction
(cac.cpp:973-977) when a monitor frame’s m_cid is non-
NORMAL (e.g. ECA_NORDACCESS from no_read_access_event
after an ACF reload). Routed to the per-subscription
callback as Err(CaError::ServerError(eca_status)) so the
subscriber surfaces the status instead of seeing the bogus
zeroed payload that travels with the frame.
TooLarge
Request cannot be framed for the peer: it needs the extended
(24-byte) CA header, and the peer’s protocol version predates
CA_V49, or the element count exceeds what the peer can carry.
libca raises this locally — comQueSend::insertRequestHeader
throws cacChannel::outOfBounds() (comQueSend.cpp:299,313)
and ca_array_get/ca_array_put return ECA_TOLARGE — so no
byte reaches the wire.
BadCount
Element count out of bounds for the request C would build. libca’s
put path throws cacChannel::outOfBounds() for an array that cannot
fit the peer’s message-body limit (comQueSend.cpp:361) or that
needs an extended header the peer cannot parse
(comQueSend.cpp:313); oldChannelNotify.cpp:309,378,453 map that
to ECA_BADCOUNT. Raised locally — no byte reaches the wire.
GetConvertFailed(String)
A get conversion returned a non-zero status: C
dbGetConvertRoutine/dbFastGetConvertRoutine refusing to render a
field in the requested DBR type, which for the DBF_STRING row means
epicsParse* rejecting the stored text (cvt_st_d,
dbFastLinkConv.c:233-244). dbChannel_get turns it into -1
(db_access.c:816) and rsrv answers the read with a ZEROED payload and
m_cid = ECA_GETFAIL (camessage.c:545-561) rather than a value.
Distinct from Self::InvalidValue, which the put direction raises and
rsrv answers ECA_PUTFAIL.
Implementations§
Trait Implementations§
Source§impl Error for CaError
impl Error for CaError
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()