=doc make missing snippets errors again

This commit is contained in:
Konrad Malawski 2015-12-23 18:34:37 +01:00
parent ff152b816d
commit d64c4a6546
2 changed files with 3 additions and 4 deletions

View file

@ -48,7 +48,7 @@ class IncludeCode2(Directive):
lines = f.readlines()
f.close()
except (IOError, OSError):
return [document.reporter.warning(
return [document.reporter.error(
'Include file %r not found or reading it failed' % fn,
line=self.lineno)]
except UnicodeError:
@ -98,8 +98,7 @@ class IncludeCode2(Directive):
text = ''.join(res)
if text == "":
# in includecode2 it indeed is a warning, an empty code block will be inserted
return [document.reporter.warning('Snippet "' + snippet + '" not found!', line=self.lineno)]
return [document.reporter.error('Snippet "' + snippet + '" not found!', line=self.lineno)]
retnode = nodes.literal_block(text, text, source=fn)
document.settings.env.note_dependency(rel_fn)

View file

@ -96,7 +96,7 @@ logic in Flows and attaching those to :class:`StreamIO` in order to implement yo
In this example both client and server may need to close the stream based on a parsed command - ``BYE`` in the case
of the server, and ``q`` in the case of the client. This is implemented by using a custom :class:`PushStage`
(see :ref:`stream-using-push-pull-stage-java`) which completes the stream once it encounters such command.
which completes the stream once it encounters such command.
Streaming File IO
=================