Skip to content

Commit

Permalink
move errors.rs file to reachable place for workspaces
Browse files Browse the repository at this point in the history
Olivier authored and oroulet committed Jan 5, 2025
1 parent 931ffe2 commit ed81732
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion opcua-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -64,7 +64,6 @@ pub mod constants {

pub mod comms;
pub mod config;
pub mod errors;
pub mod handle;

pub mod messages;
1 change: 0 additions & 1 deletion opcua-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ struson = { workspace = true, optional = true }

opcua-xml = { path = "../opcua-xml", optional = true }


[dev-dependencies]
opcua-types = { path = ".", features = ["xml", "json"] }
serde_json = { workspace = true }
8 changes: 6 additions & 2 deletions opcua-core/src/errors.rs → opcua-types/src/errors.rs
Original file line number Diff line number Diff line change
@@ -3,15 +3,19 @@

//! Rust OpcUa specific errors
use opcua_types::VariantScalarTypeId;
use thiserror::Error;

use crate::VariantScalarTypeId;

/// Rust OpcUa specific errors
#[allow(missing_docs)]
#[derive(Error, Debug)]
pub enum OpcUAError {
#[error("Received an unexpected variant type")]
UnexpectedVariantType(Option<VariantScalarTypeId>),
UnexpectedVariantType {
variant_id: Option<VariantScalarTypeId>,
message: String,
},
#[error("The requested namespace does not exists")]
NamespaceDoesNotExist(String),
}
1 change: 1 addition & 0 deletions opcua-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -250,6 +250,7 @@ pub mod data_value;
pub mod date_time;
pub mod diagnostic_info;
pub mod encoding;
pub mod errors;
pub mod event_field;
pub mod expanded_node_id;
pub mod extension_object;

0 comments on commit ed81732

Please sign in to comment.