Merge pull request #373 from matthiasbeyer/libimagrt/err-kind-is-err-type
Rename: kind() to err_type()
This commit is contained in:
commit
208003364e
2 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ pub mod error {
|
||||||
/**
|
/**
|
||||||
* get the Kind of the Error
|
* get the Kind of the Error
|
||||||
*/
|
*/
|
||||||
pub fn kind(&self) -> ConfigErrorKind {
|
pub fn err_type(&self) -> ConfigErrorKind {
|
||||||
self.kind.clone()
|
self.kind.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ pub mod error {
|
||||||
* Get the string, the ConfigError can be described with
|
* Get the string, the ConfigError can be described with
|
||||||
*/
|
*/
|
||||||
pub fn as_str(e: &ConfigError) -> &'static str {
|
pub fn as_str(e: &ConfigError) -> &'static str {
|
||||||
match e.kind() {
|
match e.err_type() {
|
||||||
ConfigErrorKind::NoConfigFileFound => "No config file found",
|
ConfigErrorKind::NoConfigFileFound => "No config file found",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ impl<'a> Runtime<'a> {
|
||||||
let cfg = Configuration::new(&rtp);
|
let cfg = Configuration::new(&rtp);
|
||||||
let cfg = if cfg.is_err() {
|
let cfg = if cfg.is_err() {
|
||||||
let e = cfg.err().unwrap();
|
let e = cfg.err().unwrap();
|
||||||
if e.kind() != ConfigErrorKind::NoConfigFileFound {
|
if e.err_type() != ConfigErrorKind::NoConfigFileFound {
|
||||||
let cause : Option<Box<Error>> = Some(Box::new(e));
|
let cause : Option<Box<Error>> = Some(Box::new(e));
|
||||||
return Err(RuntimeError::new(RuntimeErrorKind::Instantiate, cause));
|
return Err(RuntimeError::new(RuntimeErrorKind::Instantiate, cause));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue