Closed Nickolaim closed 6 years ago
Instead of embedding the filename into every error message (the current patch only does it in a few places) wouldn't it make more sense to store the filename as well as the list of errors in the InvalidPackage
instance as members? Then the string representation can combine them in a standard way.
Yep, it makes sense, will do. Please note that file name is not always available at the moment when the exception is raised, so the code for populating file name in some exception handlers will remain.
From: Dirk Thomas notifications@github.com Sent: Friday, March 30, 2018 3:29:12 PM To: ros-infrastructure/catkin_pkg Cc: Nick Medveditskov; Author Subject: Re: [ros-infrastructure/catkin_pkg] InvalidPackage with package name (#209)
Instead of embedding the filename into every error message (the current patch only does it in a few places) wouldn't it make more sense to store the filename as well as the list of errors in the InvalidPackage instance as members? Then the string representation can combine them in a standard way.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fros-infrastructure%2Fcatkin_pkg%2Fpull%2F209%23issuecomment-377637702&data=02%7C01%7C%7Ce719adc12a744dc4265f08d5968da9f7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636580457534030174&sdata=FONfqv4wNoQbKqA%2FBpmHclLeMwvPACNYyl%2FhRV9%2Fbk0%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAItCFecPJYYMJWG8oaPZaBKafKCrC6y4ks5tjrG3gaJpZM4S2e61&data=02%7C01%7C%7Ce719adc12a744dc4265f08d5968da9f7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636580457534030174&sdata=q9hTQFBQJKCpbHRRTgTGX43xrAAKji8mc0q5vHRzLMU%3D&reserved=0.
Thank you for working on this.
parse_package_string()
raisesInvalidPackage
exception with the package name in the message.This work is needed for https://github.com/ros-infrastructure/rosdep/issues/598