Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] InterpolationException thrown by StringSearchInterpolator?

Hi Tobias,

 

The main reason for using an exception was to let the caller of the interpolator decide what to do in case of a failure, but I do not have any use case for this in mind and the longer I think about it, the more I think it does not make much sense to continue anything in failure cases. So I think its fine to fail the build in case on an InterpolationException.

 

-martin

 

Von: Oberlies, Tobias [mailto:tobias.oberlies@xxxxxxx]
Gesendet: Freitag, 06. Februar 2015 11:05
An: SCHREIBER.Martin
Cc: Tycho developers list (tycho-dev@xxxxxxxxxxx)
Betreff: InterpolationException thrown by StringSearchInterpolator?

 

Hi Martin,

 

I have a question about the exception handling in the Interpolator class: as far as I can see, you have explicitly added an InterpolationException type which allows Tycho to ignore when an interpolation fails. Now my question is: Do you have a use case for this? I.e. are you aware of a situation in which these InterpolationExceptions are thrown and in which it is required that the build only warns but does not fail?

 

From what I can see in the StringSearchInterpolator tests [1], that class only ever throws exceptions in very obscure cases.

 

So, is it okay if I let the build fail in case of an InterpolationException [2]. This makes things a little bit easier for me.

 

All the best

Tobias

 

 

[1] https://github.com/sonatype/plexus-interpolation/blob/master/src/test/java/org/codehaus/plexus/interpolation/StringSearchInterpolatorTest.java

[2] https://git.eclipse.org/r/#/c/41155/1/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoInterpolator.java

 


Back to the top