Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java @ 18781:941761f6b736
Truffle-DSL: fixed thrown exception messages should provide more contextual information. (reported by Benoit Daloze)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Jan 2015 20:23:22 +0100 |
parents | c0fb70634640 |
children | b9cf6f3150ea |
comparison
equal
deleted
inserted
replaced
18780:f4d78e4a878d | 18781:941761f6b736 |
---|---|
90 NodeData enclosedChild = parseRootType(enclosedType); | 90 NodeData enclosedChild = parseRootType(enclosedType); |
91 if (enclosedChild != null) { | 91 if (enclosedChild != null) { |
92 enclosedNodes.add(enclosedChild); | 92 enclosedNodes.add(enclosedChild); |
93 } | 93 } |
94 } | 94 } |
95 NodeData node = parseNode(rootType); | 95 NodeData node; |
96 try { | |
97 node = parseNode(rootType); | |
98 } catch (CompileErrorException e) { | |
99 throw e; | |
100 } catch (Throwable e) { | |
101 throw new RuntimeException(String.format("Parsing of Node %s failed.", ElementUtils.getQualifiedName(rootType)), e); | |
102 } | |
96 if (node == null && !enclosedNodes.isEmpty()) { | 103 if (node == null && !enclosedNodes.isEmpty()) { |
97 node = new NodeData(context, rootType); | 104 node = new NodeData(context, rootType); |
98 } | 105 } |
99 | 106 |
100 if (node != null) { | 107 if (node != null) { |