-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b9d51a
commit dc8a929
Showing
5 changed files
with
117 additions
and
47 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
src/main/java/com/github/tobiasmiosczka/cinema/KDMManager/Starter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/github/tobiasmiosczka/cinema/KDMManager/helper/ConfigParseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.tobiasmiosczka.cinema.KDMManager.helper; | ||
|
||
import org.jdom2.Element; | ||
|
||
import java.util.LinkedList; | ||
import java.util.List; | ||
|
||
public class ConfigParseException extends Throwable { | ||
|
||
private final List<String> stack = new LinkedList<>(); | ||
|
||
public ConfigParseException(Element element, String name) { | ||
stack.add(name); | ||
while (element != null) { | ||
stack.add(element.getName()); | ||
element = element.getParentElement(); | ||
} | ||
} | ||
|
||
@Override | ||
public String getMessage() { | ||
return stack.stream().reduce("", (a, b) -> "<" + b + "> " + a); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters