in lib/generator.js [2235:2252]
visitException(ast, exceptionName, extendOn, level, env) {
this.emit(`public class ${exceptionName} : `, level);
this.visitExtendOn(extendOn, 'exception');
this.emit('\n');
this.emit('{\n', level);
this.visitEcxceptionBody(ast.exceptionBody, level + 1, exceptionName, env);
this.emit(`\n`);
for (let i = 0; i < ast.exceptionBody.nodes.length; i++) {
const node = ast.exceptionBody.nodes[i];
if (node.fieldValue.type === 'modelBody') {
this.emit(`public class ${exceptionName}${_upperFirst(node.fieldName.lexeme)} : Darabonba.Model\n`, level + 1);
this.emit('{\n', level + 1);
this.visitModelBody(node.fieldValue, level + 2, env, exceptionName + _upperFirst(node.fieldName.lexeme));
this.emit('}\n', level + 1);
}
}
this.emit('}\n\n', level);
}