Rename TorConnectionFailed to TorAccessFailed

This commit is contained in:
Nick Mathewson 2022-02-22 15:38:13 -05:00
parent 3f0d50e08f
commit 7d4a57d5fa
3 changed files with 4 additions and 4 deletions

View File

@ -74,10 +74,10 @@ impl tor_error::HasKind for Error {
use Error as E;
use ErrorKind as EK;
match self {
E::ChanTimeout | E::Io { .. } | E::Proto(ProtoErr::IoErr(_)) => EK::TorConnectionFailed,
E::ChanTimeout | E::Io { .. } | E::Proto(ProtoErr::IoErr(_)) => EK::TorAccessFailed,
E::Spawn { cause, .. } => cause.kind(),
E::Proto(e) => e.kind(),
E::PendingFailed => EK::TorConnectionFailed,
E::PendingFailed => EK::TorAccessFailed,
E::UnusableTarget(_) | E::Internal(_) => EK::Internal,
}
}

View File

@ -156,7 +156,7 @@ impl HasKind for Error {
E::BadHexInCache(_) => EK::CacheCorrupted,
E::UnrecognizedAuthorities => EK::TorProtocolViolation,
E::ManagerDropped => EK::ArtiShuttingDown,
E::CantAdvanceState => EK::TorConnectionFailed,
E::CantAdvanceState => EK::TorAccessFailed,
E::StorageError(_) => EK::CacheAccessFailed,
E::ConsensusDiffError(_) => EK::TorProtocolViolation,
E::NetDocError { source, .. } => match source {

View File

@ -117,7 +117,7 @@ pub enum ErrorKind {
/// properly. Not used for errors that occur within the Tor network, or accessing the public
/// internet on the far side of Tor.
#[display(fmt = "error connecting to Tor")]
TorConnectionFailed,
TorAccessFailed,
/// An attempt was made to use a Tor client for something without bootstrapping it first.
#[display(fmt = "attempted to use unbootstrapped client")]