[ 
https://issues.apache.org/jira/browse/FELIX-483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595685#action_12595685
 ] 

Richard S. Hall commented on FELIX-483:
---------------------------------------

Now that we throw an invalid syntax exception from RequirementImpl.setFilter(), 
should we still log the error here when an exception occurs or should it be 
logged elsewhere in the catch?

The main benefit of logging it here is that we can be assured that a reasonable 
log message is always printed; however, it means that this message will always 
be printed even if the calling catch code handles the error properly and 
doesn't want this message logged.

Thoughts?

> Log detailed information on invalid syntax in parsed repository xml 
> requirements
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-483
>                 URL: https://issues.apache.org/jira/browse/FELIX-483
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: felix-1.0.0
>            Reporter: Alin Dreghiciu
>            Assignee: Richard S. Hall
>
> While parsing the repository xml BundleRepository logs an exception message 
> while parsing requirements. This is fine but the information logged is not of 
> too much use. 
> Eg. for the sogi alliance repository it will log something like:
> org.osgi.framework.InvalidSyntaxException: expected ~=|>=|<=
> Just with this information you cannot do to much.
> I suggest that RequirementImpl.setFilter to be changed to output also the 
> failing filter.
> e.g. for the case above:
> Filter (&(package=org.apache.batik.i18n)(version>=1.6.0)(version<1.7.0))  
> parsing failed due to org.osgi.framework.InvalidSyntaxException: expected 
> ~=|>=|<=

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to