mirror of
https://gitlab.cern.ch/wotsubo/endcap-sl-software-ri-generator.git
synced 2025-04-12 00:17:55 +09:00
Refactor error msg
This commit is contained in:
parent
b5d165a3f5
commit
cba5b8594b
3 changed files with 8 additions and 7 deletions
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Moved register value mask definitions from reg module to field value impl.
|
- Moved register value mask definitions from reg module to field value impl.
|
||||||
|
- Updated error messages for #[from] attributed errors.
|
||||||
|
|
||||||
## [0.3.0] - 2025-03-27
|
## [0.3.0] - 2025-03-27
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ use thiserror::Error;
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum CodeGenError {
|
pub enum CodeGenError {
|
||||||
#[error("tokenization(syn) error: {0}")]
|
#[error("tokenization(syn) error")]
|
||||||
SynError(#[from] syn::Error),
|
SynError(#[from] syn::Error),
|
||||||
#[error("failed to create file (name duplicated): {0}")]
|
#[error("failed to create file (name duplicated): {0}")]
|
||||||
FilePathDuplicatedError(String),
|
FilePathDuplicatedError(String),
|
||||||
|
|
|
@ -11,20 +11,20 @@ use crate::{
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
#[error("error in getting xml git info: {0}")]
|
#[error("error in getting xml git info")]
|
||||||
XmlGitInfoError(#[from] XmlGitInfoError),
|
XmlGitInfoError(#[from] XmlGitInfoError),
|
||||||
#[error("io error: {0}")]
|
#[error("io error")]
|
||||||
IOError(#[from] std::io::Error),
|
IOError(#[from] std::io::Error),
|
||||||
#[error("xml parse error: {0}")]
|
#[error("xml parse error")]
|
||||||
XmlParseError(#[from] roxmltree::Error),
|
XmlParseError(#[from] roxmltree::Error),
|
||||||
#[error("dom conversion error: {0}")]
|
#[error("dom conversion error")]
|
||||||
DomConversionError(#[from] converter::DomConversionError),
|
DomConversionError(#[from] converter::DomConversionError),
|
||||||
#[error("invalid register map:\n{}", ._0.iter().map(|e| e.to_string()).join("\n"))]
|
#[error("invalid register map:\n{}", ._0.iter().map(|e| e.to_string()).join("\n"))]
|
||||||
RegmapValidationError(Vec<validator::ValidationError>),
|
RegmapValidationError(Vec<validator::ValidationError>),
|
||||||
#[error("code generation error: {0}")]
|
#[error("code generation error")]
|
||||||
CodeGenError(#[from] generator::CodeGenError),
|
CodeGenError(#[from] generator::CodeGenError),
|
||||||
#[cfg(feature = "flatmap")]
|
#[cfg(feature = "flatmap")]
|
||||||
#[error("csv write error: {0}")]
|
#[error("csv write error")]
|
||||||
CsvWriteError(#[from] csv::Error),
|
CsvWriteError(#[from] csv::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue