directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fel...@apache.org>
Subject Re: Exception logging inconsistent ?
Date Wed, 03 Mar 2010 09:16:01 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/03/10 10:12, Felix Knecht wrote:
> Hi all
> 
> I came across following log/exception [1]:
> 
> <snip>
> String msg = "RuleId " + ruleId + " not found in ruleId to schema name
> map!";
> LOG.warn( msg );
> throw new NamingException( msg );
> </snip>
> 
> Wouldn't it be more consistent when logging an error instead of a
> warning when afterwards an exception is thrown?

There are even more, this time logging a debug message [line 142 ff]:

String msg = "DITStructureRule for ruleId " + ruleId + " does not exist!";
LOG.debug( msg );
throw new NamingException( msg );

> 
> If wanted I can fix when I come across such codings.
> 
> Felix
> 
> [1]
> shared-ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultDITStructureRuleRegistry.java
> [line 103 ff]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuOKNEACgkQ2lZVCB08qHEnQwCfTypdzKZOcmIA4gH6opNNNT/V
q8QAnA3FGzf/YdhgH40IUJMCXMeEIA4B
=qaLM
-----END PGP SIGNATURE-----

Mime
View raw message