Skip to content

Commit 35cf1ff

Browse files
committed
Create a basic gix-error crate to forward exn
1 parent 9081b8f commit 35cf1ff

File tree

8 files changed

+49
-2
lines changed

8 files changed

+49
-2
lines changed

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ members = [
229229
"gix-trace",
230230
"gix-commitgraph",
231231
"gix-chunk",
232+
"gix-error",
232233
"gix-quote",
233234
"gix-object",
234235
"gix-glob",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ is usable to some extent.
141141
* [gix-dir](https://github.com/GitoxideLabs/gitoxide/blob/main/crate-status.md#gix-dir)
142142
* [gix-merge](https://github.com/GitoxideLabs/gitoxide/blob/main/crate-status.md#gix-merge)
143143
* [gix-shallow](https://github.com/GitoxideLabs/gitoxide/blob/main/crate-status.md#gix-shallow)
144+
* [gix-error](https://github.com/GitoxideLabs/gitoxide/blob/main/crate-status.md#gix-error)
144145
* `gitoxide-core`
145146
* **very early** _(possibly without any documentation and many rough edges)_
146147
* [gix-blame](https://github.com/GitoxideLabs/gitoxide/blob/main/crate-status.md#gix-blame)

crate-status.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,12 @@ A mechanism to associate metadata with any object, and keep revisions of it usin
572572
- note that it's less critical to support it as `gitoxide` allows access but prevents untrusted configuration to become effective.
573573

574574
### gix-date
575-
* [ ] parse git dates
576-
* [ ] serialize `Time`
575+
* [x] parse git dates
576+
* [x] serialize `Time`
577+
578+
### gix-error
579+
580+
A basic crate for comon error types and utilities, changed as needed to replace `thiserror`.
577581

578582
### gix-credentials
579583
* [x] launch git credentials helpers with a given action

gix-error/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
lints.workspace = true
2+
3+
[package]
4+
name = "gix-error"
5+
version = "0.0.0"
6+
repository = "https://github.com/GitoxideLabs/gitoxide"
7+
license = "MIT OR Apache-2.0"
8+
description = "A crate of the gitoxide project to provide common errors and error-handling utilities"
9+
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
10+
edition = "2021"
11+
include = ["src/**/*", "LICENSE-*"]
12+
rust-version = "1.82"
13+
14+
[lib]
15+
doctest = false
16+
17+
[dependencies]
18+
exn = "0.2.1"
19+

gix-error/LICENSE-APACHE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-APACHE

gix-error/LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-MIT

gix-error/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//! Common error types and utilities for error handling.
2+
#![deny(missing_docs, unsafe_code)]
3+
4+
pub use exn::Exn;
5+
/// A result type to hide the [Exn] error wrapper.
6+
pub use exn::Result;
7+
pub use exn::ResultExt;

0 commit comments

Comments
 (0)