Skip to main content

CaError

Enum CaError 

Source
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_actionECA_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 (dbPutLinkdbDbPutValue) 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

Fields

§line: usize
§column: usize
§message: String
§

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 Debug for CaError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CaError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CaError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CaError> for AutosaveError

Source§

fn from(e: CaError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CaError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more