trying antora

This commit is contained in:
jstaerk
2023-02-27 15:13:55 +01:00
parent 22591398d8
commit 6372d8c7d2
8 changed files with 483 additions and 0 deletions

21
doc/antora/code/my_app.rb Normal file
View File

@@ -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'] || '<stdin>'}: 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