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/03/31 11:09:38 UTC

error management in OBR

Hello, 

I have a problem with the ResolverImpl.deploy() method. This method catches
errors but does not let me know anything bad happend because errors are not
thrown and there is no returned value. 
Is there something planned (or already done) about that ?

Thanks, 
Cedric
-- 
View this message in context: http://old.nabble.com/error-management-in-OBR-tp31284597p31284597.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


Re: error management in OBR

Posted by Cédric Casenove <cc...@axway.com>.
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>.
When deploying a bundle, I can get a BundleException (if the bundle cannot
start), and it is not thrown. I get the error message "Resolver: Update
error " and the stacktrace. I saw the code, and it seems to be the same for
any exception thrown by bundles actions (start, stop, update, install). 


niibasta@gmail.com wrote:
> 
> Hello!
> 
> What kind of errors have you got?
> 
> On 31.03.2011 13:09, Cédric Casenove wrote:
>> Hello,
>>
>> I have a problem with the ResolverImpl.deploy() method. This method
>> catches
>> errors but does not let me know anything bad happend because errors are
>> not
>> thrown and there is no returned value.
>> Is there something planned (or already done) about that ?
>>
>> Thanks,
>> Cedric
> 
> 
> ---------------------------------------------------------------------
> 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-tp31284597p31286170.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 "niibasta@gmail.com" <ni...@gmail.com>.
Hello!

What kind of errors have you got?

On 31.03.2011 13:09, Cédric Casenove wrote:
> Hello,
>
> I have a problem with the ResolverImpl.deploy() method. This method catches
> errors but does not let me know anything bad happend because errors are not
> thrown and there is no returned value.
> Is there something planned (or already done) about that ?
>
> Thanks,
> Cedric


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