You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Slawomir Jaranowski (Jira)" <ji...@apache.org> on 2024/03/17 10:36:00 UTC

[jira] [Commented] (MCLEAN-116) Create interface method to catch exceptions

    [ https://issues.apache.org/jira/browse/MCLEAN-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827777#comment-17827777 ] 

Slawomir Jaranowski commented on MCLEAN-116:
--------------------------------------------

[~bukama] thanks for issue and PR

I assume that you PR resolve problem with propagating source exception in {{Cleaner}} class.

So maybe we should change issue and commit subject to show what we do and what is the problem.

Simply something like: "Propagate exception in Cleaner class"

> Create interface method to catch exceptions
> -------------------------------------------
>
>                 Key: MCLEAN-116
>                 URL: https://issues.apache.org/jira/browse/MCLEAN-116
>             Project: Maven Clean Plugin
>          Issue Type: Improvement
>    Affects Versions: 3.3.2
>            Reporter: Matthias Bünger
>            Priority: Minor
>
> As stated multiple times in the {{Cleaner}} class, the {{Logger}} interface of this class does not provide a method to log exceptions and needs a refactoring
> {code:java}
> // ...
>             if (logDebug != null) {
>                 // TODO: this Logger interface cannot log exceptions and needs refactoring
>                 logDebug.log("Unable to fast delete directory: " + e);
>             }
> // ...
>     private interface Logger {
>         void log(CharSequence message);
>     }
> {code}
> However: Many plugins, e.g. the javadoc-plugin or the pmg-plugin use the {{org.apache.maven.plugin.logging.Log}} interface. Therefor using this interface instead an own could be a better solution than adding a new method to the interface in the {{Cleaner}} class.
> _This ticket was created to have this task in the issue tracker_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)