Improve error messaging
This commit is contained in:
parent
c144a6d624
commit
652e95c361
1 changed files with 10 additions and 8 deletions
|
@ -1824,11 +1824,13 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
|||
},
|
||||
Err(e) => {
|
||||
match e {
|
||||
Error::InsufficientFunds(_y) => {
|
||||
Error::InsufficientFunds(y) => {
|
||||
println!("{:?}", y);
|
||||
let x = Hhex {bytes: vec![0]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::ChangeRequired(_y1) => {
|
||||
Error::ChangeRequired(y1) => {
|
||||
println!("{:?}", y1);
|
||||
let x = Hhex {bytes: vec![1]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
|
@ -1836,27 +1838,27 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
|||
let x = Hhex {bytes: vec![2]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::Balance(x) => {
|
||||
Error::Balance(y3) => {
|
||||
let x = Hhex {bytes: vec![3]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::TransparentBuild(x) => {
|
||||
Error::TransparentBuild(y4) => {
|
||||
let x = Hhex {bytes: vec![4]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::SaplingBuild(x) => {
|
||||
Error::SaplingBuild(y5) => {
|
||||
let x = Hhex {bytes: vec![5]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::OrchardBuild(x) => {
|
||||
Error::OrchardBuild(y7) => {
|
||||
let x = Hhex {bytes: vec![6]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::OrchardSpend(x) => {
|
||||
Error::OrchardSpend(y8) => {
|
||||
let x = Hhex {bytes: vec![7]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
Error::OrchardRecipient(x) => {
|
||||
Error::OrchardRecipient(y9) => {
|
||||
let x = Hhex {bytes: vec![8]};
|
||||
marshall_to_haskell_var(&x, out, out_len, RW);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue