aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sdp/ao_markup_source_raw.d
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sdp/ao_markup_source_raw.d')
-rw-r--r--lib/sdp/ao_markup_source_raw.d23
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/sdp/ao_markup_source_raw.d b/lib/sdp/ao_markup_source_raw.d
index 3d937ac..fb76e98 100644
--- a/lib/sdp/ao_markup_source_raw.d
+++ b/lib/sdp/ao_markup_source_raw.d
@@ -1,6 +1,6 @@
/*
-#+OPTIONS: ^:nil _:nil#+OPTIONS: ^:nil _:nil
-* sisu_markup_source_raw.d
+ markup source raw
+ ao_markup_source_raw.d
*/
mixin template SiSUmarkupRaw() {
class MarkupRaw {
@@ -11,12 +11,21 @@ mixin template SiSUmarkupRaw() {
"file not found"
);
string source_txt_str;
- if (exists(fn_src)) {
- source_txt_str = readText(fn_src); // ok
- std.utf.validate(source_txt_str);
+ try {
+ if (exists(fn_src)) {
+ source_txt_str = readText(fn_src); // ok
+ }
}
- // string source_txt_str = cast(string) read(fn_src);
- // std.utf.validate(source_txt_str);
+ catch (ErrnoException ex) {
+ // Handle errors
+ }
+ catch (UTFException ex) {
+ // Handle validation errors
+ }
+ catch (FileException ex) {
+ // Handle errors
+ }
+ std.utf.validate(source_txt_str);
return source_txt_str;
}
final private char[][] markupSourceLineArray(in string src_text) {