source: java2python/src/main/java/tudelft/utilities/j2p/t/TranslationException.java@ 395

Last change on this file since 395 was 391, checked in by wouter, 2 years ago

#115 working at translators for annotations

File size: 488 bytes
Line 
1package tudelft.utilities.j2p.t;
2
3import com.github.javaparser.ast.Node;
4
5public class TranslationException extends Exception {
6 private final Node problemspot;
7
8 public TranslationException(String message, Node problemspot) {
9 super(message + ":" + specify(problemspot));
10 this.problemspot = problemspot;
11 }
12
13 /**
14 *
15 * @param problemspot2
16 * @return string explanation of the problem spot
17 */
18 private static String specify(Node spot) {
19 return " at:\n" + spot.toString();
20 }
21}
Note: See TracBrowser for help on using the repository browser.