Skip to content

Commit 10d4379

Browse files
authored
Merge pull request #18 from SpringQL/feat/better-error
feat: more informative error
2 parents 21af5e1 + 8c423b4 commit 10d4379

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "springql-client-c"
3-
version = "0.3.1"
3+
version = "0.3.1+2"
44

55
authors = ["Sho Nakatani <[email protected]>"]
66
license = "MIT OR Apache-2.0"

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ All you need to do are:
2525

2626
See [`c_example/`](https://github.com/SpringQL/SpringQL-client-c/tree/main/c_example) for how to write and build a SpringQL embedded application.
2727

28+
## Versioning
29+
30+
[Semantic versioning](https://semver.org/) in `<major>.<minor>.<patch>(\+<build>)?` format.
31+
32+
`<major>.<minor>.<patch>` is exactly the same as the version of `springql-core` crate.
33+
34+
`<build>` is an incremental number. `N`th build (`N > 1`) for the `springql-core vX.Y.Z` is `vX.Y.Z+N`, for example.
35+
2836
## Development
2937

3038
### Build

src/spring_last_err.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{
88
os::raw::{c_char, c_int},
99
};
1010

11-
use log::{error, warn};
11+
use log::{info, warn};
1212
use springql_core::error::SpringError;
1313

1414
use crate::{cstr::strcpy, spring_errno::SpringErrno};
@@ -38,7 +38,7 @@ impl Error for LastError {
3838
impl Display for LastError {
3939
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4040
let s = match self {
41-
LastError::SpringErr(e) => format!("{}", e),
41+
LastError::SpringErr(e) => format!("{:?}", e),
4242
LastError::UnwindErr(any) => {
4343
if let Some(s) = any.downcast_ref::<String>() {
4444
s.clone()
@@ -55,7 +55,7 @@ impl Display for LastError {
5555

5656
/// Update the most recent error, clearing whatever may have been there before.
5757
pub(super) fn update_last_error(err: LastError) {
58-
error!("Setting LAST_ERROR: {}", err);
58+
info!("Setting LAST_ERROR: {}", err);
5959

6060
{
6161
// Print a pseudo-backtrace for this error, following back each error's

0 commit comments

Comments
 (0)