From 5803691ace8056330e0ef3bd254dea9c706f16bd Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 17 Jun 2021 14:13:38 +0300 Subject: [PATCH] antora --- code/my_app.rb | 21 +++++++++++++++++++++ docs/antora.yml | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 code/my_app.rb diff --git a/code/my_app.rb b/code/my_app.rb new file mode 100644 index 0000000..b691710 --- /dev/null +++ b/code/my_app.rb @@ -0,0 +1,21 @@ +# This file represents "software". +# This file helps show that documentation files can be in the same repository as software. + +rescue => ex + begin + context = %(asciidoctor: FAILED: #{attrs['docfile'] || ''}: Failed to load AsciiDoc document) + if ex.respond_to? :exception + # The original message must be explicitely preserved when wrapping a Ruby exception + wrapped_ex = ex.exception %(#{context} - #{ex.message}) + # JRuby automatically sets backtrace, but not MRI + wrapped_ex.set_backtrace ex.backtrace + else + # Likely a Java exception class + wrapped_ex = ex.class.new context, ex + wrapped_ex.stack_trace = ex.stack_trace + end + rescue + wrapped_ex = ex + end + raise wrapped_ex +end diff --git a/docs/antora.yml b/docs/antora.yml index 189cfaa..c8de6d5 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,5 +1,5 @@ -name: component-b -title: Component B +name: hybrid +title: swarmlab version: dev nav: - modules/ROOT/nav.adoc