migrated some exceptions to use templates

fixed missed hard coded value in template
fixed listing of channels in channel groups
fixed template loading
This commit is contained in:
Sheldan
2020-05-13 17:04:21 +02:00
parent c429aa882b
commit 80505d1014
43 changed files with 332 additions and 108 deletions

View File

@@ -32,7 +32,8 @@ public class DatabaseTemplateLoader implements TemplateLoader {
*/
@Override
public Object findTemplateSource(String s) throws IOException {
return templateManagementService.getTemplateByKey(s);
Optional<Template> templateByKey = templateManagementService.getTemplateByKey(s);
return templateByKey.orElseThrow(() -> new IOException(String.format("Failed to load template. %s", s)));
}
@Override