[jboss-jira] [JBoss JIRA] (DROOLS-1039) An invalid kie.conf should throw an exception and not be silently ignored

Geoffrey De Smet (JIRA) issues at jboss.org
Thu Apr 14 06:41:00 EDT 2016


    [ https://issues.jboss.org/browse/DROOLS-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191729#comment-13191729 ] 

Geoffrey De Smet commented on DROOLS-1039:
------------------------------------------

I think it should fail fast, so it should throw an Exception, such as an IllegalStateException.

rantStart

Log messages can get lost (especially when deploying on app servers that ignore your logging config), are frequently ignored (too many projects start up with a dozen log messages, so that log message will scroll by in a few seconds, ...).

Crashing the app is a much better solution. It forces the developer to fix his stuff, immediately after he broke it, while he/she still remembers what he/she was doing. It doesn't allow it result to be judged as "assemblers don't work" (when the error message is burried in the log).

Frameworks that don't fail fast always have the same faith in large enterprise projects: they gather misconfigurations over time and they results/behaviour becomes suprising (as in incorrect) due to this misconfigurations. Users lose faith in them and even those the users are to blame for the misconfigurations, I believe the framework developers are too blame for allowing them to get away with it :)

rantEnd

> An invalid kie.conf should throw an exception and not be silently ignored
> -------------------------------------------------------------------------
>
>                 Key: DROOLS-1039
>                 URL: https://issues.jboss.org/browse/DROOLS-1039
>             Project: Drools
>          Issue Type: Enhancement
>          Components: core engine
>    Affects Versions: 6.4.0.Beta1
>            Reporter: Geoffrey De Smet
>            Assignee: Mario Fusco
>
> In drools-belief or optaplanner-core, change the META-INF/kie.conf file like this:
> {code}
> [
> 'assemblers' : [ new org.foo.ThisDoesNotExists() ],
> 'weavers' : [],
> 'runtimes' : [],
> 'beliefs' : []
> ]
> {code}
> Current behavior: it doesn't throw any exception, but of course later on things go haywire at some point with a completely unrelated error message.
> Expected Behavior: Fail fast and let me know that org.foo.ThisDoesNotExists does not exist and that my kie.conf is in error.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list