Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
zub4t committed Jun 25, 2024
1 parent cbe3225 commit 8426120
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
Expand All @@ -9,6 +9,7 @@
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
* zub4t - Improving failure detail message
*
*/

Expand All @@ -29,6 +30,16 @@ public StreamFailure(List<String> messages, Reason reason) {
this.reason = reason;
}

@Override
public String getFailureDetail() {
var str = super.getFailureDetail();
if (str != null && !str.isEmpty()) {
str = reason + ": " + str;
return str;
}
return String.valueOf(reason);
}

public Reason getReason() {
return reason;
}
Expand Down

0 comments on commit 8426120

Please sign in to comment.