add logging if an error occurrs in method
This commit is contained in:
parent
65c3642439
commit
cbd175229e
1 changed files with 8 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ use crate::rmc::response::ErrorCode::Core_Exception;
|
||||||
use crate::rmc::structures::qresult::ERROR_MASK;
|
use crate::rmc::structures::qresult::ERROR_MASK;
|
||||||
use crate::util::SendingBufferConnection;
|
use crate::util::SendingBufferConnection;
|
||||||
use bytemuck::bytes_of;
|
use bytemuck::bytes_of;
|
||||||
use log::error;
|
use log::{error, warn};
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::{Read, Seek, Write};
|
use std::io::{Read, Seek, Write};
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
@ -157,10 +157,13 @@ pub async fn send_result(
|
||||||
method_id,
|
method_id,
|
||||||
data: v,
|
data: v,
|
||||||
},
|
},
|
||||||
Err(e) => RMCResponseResult::Error {
|
Err(e) => {
|
||||||
|
warn!("error occurred during call: {:?}", e);
|
||||||
|
RMCResponseResult::Error {
|
||||||
call_id,
|
call_id,
|
||||||
error_code: e.into(),
|
error_code: e.into(),
|
||||||
},
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let response = RMCResponse {
|
let response = RMCResponse {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue