Add new test for invalid TLS configuration
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::Display;
|
||||
use std::io::ErrorKind;
|
||||
|
||||
/// Encapsulate errors in [`std::io::Error`] with a message
|
||||
pub fn encpasulate_error<E: Error>(e: E, msg: &str) -> std::io::Error {
|
||||
pub fn encpasulate_error<E: Display>(e: E, msg: &str) -> std::io::Error {
|
||||
std::io::Error::new(ErrorKind::Other, format!("{}: {}", msg, e))
|
||||
}
|
||||
|
||||
/// Create a new [`std::io::Error`]
|
||||
pub fn new_err(msg: &str) -> std::io::Error {
|
||||
std::io::Error::new(ErrorKind::Other, msg.to_string())
|
||||
}
|
||||
|
Reference in New Issue
Block a user