Igalia / snabb

Snabb Switch: Fast open source packet processing
Apache License 2.0
48 stars 5 forks source link

Print out user-friendly error message #1160

Closed dpino closed 6 years ago

dpino commented 6 years ago

Fixes #707 and #759

snabb config commands no longer return stack traces, but the error message contains the filename and line number where the parsing error occurred. This information is not relevant for an user. Also the user doesn't know the issue is in the path. About the error message itself, I left it as it is. Perhaps it's too fine-grained detail for an user, but useful imho. Example:

$ sudo ./snabb config set -s snabb-softwire-v2 lwaftr \
   "/softwire-config/internal-interface/reassembly-max-fragments-per-packet" "332167"
Invalid path: Struct has no field named 'reassembly-max-fragments-per-packet'.