You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Koji Kawamura (JIRA)" <ji...@apache.org> on 2018/10/29 02:55:00 UTC
[jira] [Created] (NIFI-5762) Better data-specific Expression
Language exception handling
Koji Kawamura created NIFI-5762:
-----------------------------------
Summary: Better data-specific Expression Language exception handling
Key: NIFI-5762
URL: https://issues.apache.org/jira/browse/NIFI-5762
Project: Apache NiFi
Issue Type: Improvement
Components: Core Framework
Affects Versions: 1.0.0
Reporter: Koji Kawamura
Issues:
# EL syntax can be validated before starting a component, but data specific exceptions, such as conversion error can not be caught and become runtime exceptions. There will be nothing we can do here, but we should improve error-handling best practice when that happens.
# For data-specific error, some EL functions throw IllegalAttributeException while some others use AttributeExpressionLanguageException, we need to be more consistent
# AttributeExpressionLanguageException and IllegalAttributeException both reside in org.apache.nifi.attribute.expression.language.exception, but don't have common parent Exception. Also, they don't have Javadoc for which one should be used for what errors. Difficult to write a practical error-handling at the caller side
# Above exceptions are RuntimeException and most Processors do not catch such EL evaluation failures. Then causes issues like NIFI-5761.
Ideas:
# As a non-backward compatible improvement at NiFi 2.0 or later
# Introduce new AttributeExpressionLanguageDataException, which is a checked exception so that caller should handle it properly. (IllegalAttributeException does not sound correct as EL has more broad usage, not only with FlowFile attributes)
# Migrate current AttributeExpressionLanguageException and IllegalAttributeException usages to use AttributeExpressionLanguageDataException properly.
# Add optional 'failure' relationship for each processor at framework-level, so that NiFi can route FlowFiles cause AttributeExpressionLanguageDataException to it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)