0
當通過節奏引擎小提琴在http://fiddle.rythmengine.com/#/editororg.rythmengine.exception.CompileException:未處理的異常類型異常
下面嘗試的節奏模板代碼中,我得到的錯誤:
org.rythmengine.exception.CompileException: Unhandled exception type Exception
我試過模板是:
@{
class Field {
String description;
String getDescription() throws Exception {
return description;
}
}
Field field=new Field();
field.description="test";
}
the field description is: @(field.getDescription())
我查看了某種try/catch結構的文檔,並諮詢了我最喜歡的搜索引擎。我沒有找到如何處理異常的提示。
在Rythm模板代碼中如何處理異常?
這僅僅是一個例子。如果我不能更改我的代碼呢? –
以及我看不到任何理由支持模板代碼中的CheckedException。但如果你有一個很好的理由,我可以考慮改變行爲 –