You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Javier <xl...@yahoo.com> on 2004/11/05 12:52:11 UTC

Configuration: problem with exception


Hi All

Iým using jakarta commons configuration by first time and with the
following simple code


 try {
            pc = new PropertiesConfiguration("a.ini");

        } catch (ConfigurationException ce) {
                System.err.println(ce.getMessage());
        }



at compile time received the error :

Incompatible types.

received org.apache.commons.configuration.ConfigurationException, requiered
java.lang.Throwable..

What it means ?
How could I catch the exception ?

Thanks in advance

<xl>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [configuration] problem with exception

Posted by Emmanuel Bourg <sm...@lfjr.net>.
Hi Javier, could you show us the exact error displayed by the compiler ?

Emmanuel Bourg


Javier wrote:
> 
> Hi All
> 
> Iým using jakarta commons configuration by first time and with the
> following simple code
> 
> 
>  try {
>             pc = new PropertiesConfiguration("a.ini");
> 
>         } catch (ConfigurationException ce) {
>                 System.err.println(ce.getMessage());
>         }
> 
> 
> 
> at compile time received the error :
> 
> Incompatible types.
> 
> received org.apache.commons.configuration.ConfigurationException, requiered
> java.lang.Throwable..
> 
> What it means ?
> How could I catch the exception ?
> 
> Thanks in advance
> 
> <xl>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Configuration: problem with exception

Posted by José Antonio Pérez Testa <ja...@indra.es>.
Try this:
 .....
} catch (Throwable th) {



Javier wrote:

>Hi All
>
>Iým using jakarta commons configuration by first time and with the
>following simple code
>
>
> try {
>            pc = new PropertiesConfiguration("a.ini");
>
>        } catch (ConfigurationException ce) {
>                System.err.println(ce.getMessage());
>        }
>
>
>
>at compile time received the error :
>
>Incompatible types.
>
>received org.apache.commons.configuration.ConfigurationException, requiered
>java.lang.Throwable..
>
>What it means ?
>How could I catch the exception ?
>
>Thanks in advance
>
><xl>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>  
>
-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org