summaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 303658b..473ab7a 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -43,7 +43,7 @@ impl Error for GitJournalError {
}
/// Raise an internal error
-pub fn internal_error(error: &str, detail: &str) -> Box<Error> {
+pub fn error(error: &str, detail: &str) -> Box<Error> {
Box::new(GitJournalError {
description: error.to_string(),
detail: Some(detail.to_string()),
@@ -51,7 +51,7 @@ pub fn internal_error(error: &str, detail: &str) -> Box<Error> {
})
}
-pub fn internal(error: &fmt::Display) -> Box<Error> {
+pub fn bail(error: &fmt::Display) -> Box<Error> {
Box::new(GitJournalError {
description: error.to_string(),
detail: None,
@@ -61,6 +61,6 @@ pub fn internal(error: &fmt::Display) -> Box<Error> {
macro_rules! bail {
($($fmt:tt)*) => (
- return Err(::errors::internal(&format_args!($($fmt)*)))
+ return Err(::errors::bail(&format_args!($($fmt)*)))
)
}