We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the feature Instead of : public String calc(){ try { return calcIntern(); } catch (Exception1 e1) { return "val1"; } catch (Exception2 e1) { return "val2"; } }
we can simplify the code with this new feature as:
@DefaultInCaseOfException(value="val" ) @DefaultInCaseOfException(ex = Exception1, value="val1" ) @DefaultInCaseOfException(ex = Exception2, value="val2" ) public String calc(){ return calcIntern(); }
OR
@DefaultInCaseOfException(value="val" ) public String calc(){ return calcIntern(); }
Describe the target audience Developper
Additional context Can be seen as a kind of static circuit breaker the value can be of any type (not only string) value can be also a lambda
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the feature
Instead of :
public String calc(){
try {
return calcIntern();
} catch (Exception1 e1) {
return "val1";
} catch (Exception2 e1) {
return "val2";
}
}
we can simplify the code with this new feature as:
@DefaultInCaseOfException(value="val" )
@DefaultInCaseOfException(ex = Exception1, value="val1" )
@DefaultInCaseOfException(ex = Exception2, value="val2" )
public String calc(){
return calcIntern();
}
OR
@DefaultInCaseOfException(value="val" )
public String calc(){
return calcIntern();
}
Describe the target audience
Developper
Additional context
Can be seen as a kind of static circuit breaker
the value can be of any type (not only string)
value can be also a lambda
Thanks
The text was updated successfully, but these errors were encountered: