Backup, Synchronize, Versionize
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.6 KiB

// This file is part of bsv.
//
// bsv is free software: you can redistribute it and/or modify it under the
// terms of the GNU Affero General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
// cdb is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
// more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with cdb. If not, see <https://www.gnu.org/licenses/>.
use std::path::PathBuf;
error_chain! {
foreign_links {
Io(::std::io::Error);
}
errors {
NoRepositorySpecifiedError {
description("No repository specifed")
display("No repository specifed. Use -r or set BSV_REPOSITORY environment variable.")
}
NonEmptyDirectory(dir: PathBuf) {
description("Non-empty directory")
display("Target directory {:?} must be empty.", dir)
}
InvalidObjectIdSize {
description("Object id has an invalid size")
display("Object id has an invalid size.")
}
InvalidObjectIdCharacter {
description("Object id contains invalid character")
display("Object id contains invalid character")
}
InvalidObjectType(otype: [u8; 4]) {
description("Object has an invalid object type")
display("Object has an invalid object type {:?}", otype)
}
}
}