mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Improve error messaged when parsing IPs for iphash_to_cpu/Python
Display the offending string as well as the general "Class id must be in the format (major):(minor), e.g. 1:12. May help with diagnosing #239 (since "Error: Class id..." is the only visible error message.
This commit is contained in:
@@ -116,7 +116,7 @@ fn parse_add_ip(
|
||||
) -> Result<BusRequest> {
|
||||
if !classid.contains(':') {
|
||||
return Err(Error::msg(
|
||||
"Class id must be in the format (major):(minor), e.g. 1:12",
|
||||
format!("Class id must be in the format (major):(minor), e.g. 1:12. Provided string: {classid}"),
|
||||
));
|
||||
}
|
||||
Ok(BusRequest::MapIpToFlow {
|
||||
|
||||
@@ -93,7 +93,7 @@ fn parse_add_ip(
|
||||
//}
|
||||
if !classid.contains(':') {
|
||||
return Err(Error::msg(
|
||||
"Class id must be in the format (major):(minor), e.g. 1:12",
|
||||
format!("Class id must be in the format (major):(minor), e.g. 1:12. Provided string: {classid}"),
|
||||
));
|
||||
}
|
||||
Ok(BusRequest::MapIpToFlow {
|
||||
|
||||
Reference in New Issue
Block a user