Skip to content

Commit

Permalink
Added error checking and derivedFrom on registers
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilgardis committed Apr 28, 2017
1 parent fd65485 commit 6814f43
Show file tree
Hide file tree
Showing 5 changed files with 493 additions and 228 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ version = "0.5.0"

[dependencies]
xmltree = "0.3.2"
error-chain = "0.7.2"
2 changes: 1 addition & 1 deletion generate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ EOF
fn $device() {
let xml = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/$device_path"));
svd::parse(xml);
svd::parse(xml).unwrap();
}
EOF
done
Expand Down
11 changes: 11 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use xmltree;
use std::str;
use std::num;
error_chain! {
foreign_links {
XmlParseError(xmltree::ParseError);
StrParseBoolError(str::ParseBoolError);
NumParseIntError(num::ParseIntError);

}
}
Loading

0 comments on commit 6814f43

Please sign in to comment.