You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Cédric Casenove <cc...@axway.com> on 2011/05/05 08:56:17 UTC

Re: error management in OBR

Hello again, 

I still have the same issue. Is it possible to include in the code somthing
like this (for each error got in the deploy method of the RespolverImpl) :

catch (Exception ex)
                    {
                        m_logger.log(
                            Logger.LOG_ERROR,
                            "Resolver: Update error - " +
getBundleName(localResource.getBundle()),
                            ex);
                       //OLD CODE : return;
                       //NEW CODE:
                       throw ex;
                    }

Maybe it is a choice not to throw errors, but it this case a new boolean
parameter could determine if the error must be thrown or not. 

I join the ResolverImpl class as I need it, so you can see exactly what I am
talking about. 
http://old.nabble.com/file/p31547910/ResolverImpl_throws_erros.java
ResolverImpl_throws_erros.java 

I hope you will be able to include this code in the OBR. 

Thanks, 
Cédric
-- 
View this message in context: http://old.nabble.com/error-management-in-OBR-tp31284597p31547910.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: error management in OBR

Posted by Cédric Casenove <cc...@axway.com>.
Yes, you are right, this would change OSGi behavior. But I don't need to
continue processing even in a face of an error, I need to know if I get an
error. 

I an going to see if I open a JIRA issue, thanks for you answer. 

Cédric



Richard S. Hall wrote:
> 
> Well, if you are using the OSGi API, we can't really change this to 
> throw an exception. We could potentially do it in the Felix-specific 
> API. However, this approach changes the current behavior, which is to 
> continue processing even in the face of an error. Was that your intent?
> 
> I don't have a strong opinion on this.
> 
> -> richard
> 
> On 5/5/11 2:56, Cédric Casenove wrote:
>> Hello again,
>>
>> I still have the same issue. Is it possible to include in the code
>> somthing
>> like this (for each error got in the deploy method of the RespolverImpl)
>> :
>>
>> catch (Exception ex)
>>                      {
>>                          m_logger.log(
>>                              Logger.LOG_ERROR,
>>                              "Resolver: Update error - " +
>> getBundleName(localResource.getBundle()),
>>                              ex);
>>                         //OLD CODE : return;
>>                         //NEW CODE:
>>                         throw ex;
>>                      }
>>
>> Maybe it is a choice not to throw errors, but it this case a new boolean
>> parameter could determine if the error must be thrown or not.
>>
>> I join the ResolverImpl class as I need it, so you can see exactly what I
>> am
>> talking about.
>> http://old.nabble.com/file/p31547910/ResolverImpl_throws_erros.java
>> ResolverImpl_throws_erros.java
>>
>> I hope you will be able to include this code in the OBR.
>>
>> Thanks,
>> Cédric
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/error-management-in-OBR-tp31284597p31556636.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: error management in OBR

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Well, if you are using the OSGi API, we can't really change this to 
throw an exception. We could potentially do it in the Felix-specific 
API. However, this approach changes the current behavior, which is to 
continue processing even in the face of an error. Was that your intent?

I don't have a strong opinion on this.

-> richard

On 5/5/11 2:56, Cédric Casenove wrote:
> Hello again,
>
> I still have the same issue. Is it possible to include in the code somthing
> like this (for each error got in the deploy method of the RespolverImpl) :
>
> catch (Exception ex)
>                      {
>                          m_logger.log(
>                              Logger.LOG_ERROR,
>                              "Resolver: Update error - " +
> getBundleName(localResource.getBundle()),
>                              ex);
>                         //OLD CODE : return;
>                         //NEW CODE:
>                         throw ex;
>                      }
>
> Maybe it is a choice not to throw errors, but it this case a new boolean
> parameter could determine if the error must be thrown or not.
>
> I join the ResolverImpl class as I need it, so you can see exactly what I am
> talking about.
> http://old.nabble.com/file/p31547910/ResolverImpl_throws_erros.java
> ResolverImpl_throws_erros.java
>
> I hope you will be able to include this code in the OBR.
>
> Thanks,
> Cédric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: error management in OBR

Posted by "Richard S. Hall" <he...@ungoverned.org>.
p.s. For stuff like this, you are better off opening a JIRA issue 
describing your issue and attaching your patch to it...

On 5/5/11 2:56, Cédric Casenove wrote:
> Hello again,
>
> I still have the same issue. Is it possible to include in the code somthing
> like this (for each error got in the deploy method of the RespolverImpl) :
>
> catch (Exception ex)
>                      {
>                          m_logger.log(
>                              Logger.LOG_ERROR,
>                              "Resolver: Update error - " +
> getBundleName(localResource.getBundle()),
>                              ex);
>                         //OLD CODE : return;
>                         //NEW CODE:
>                         throw ex;
>                      }
>
> Maybe it is a choice not to throw errors, but it this case a new boolean
> parameter could determine if the error must be thrown or not.
>
> I join the ResolverImpl class as I need it, so you can see exactly what I am
> talking about.
> http://old.nabble.com/file/p31547910/ResolverImpl_throws_erros.java
> ResolverImpl_throws_erros.java
>
> I hope you will be able to include this code in the OBR.
>
> Thanks,
> Cédric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org