[docs] Fix a missing code-block in the new Error docs.
authorLang Hames <lhames@gmail.com>
Tue, 25 Oct 2016 22:25:07 +0000 (22:25 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 25 Oct 2016 22:25:07 +0000 (22:25 +0000)
llvm-svn: 285134

llvm/docs/ProgrammersManual.rst

index d970f1a..2f2281c 100644 (file)
@@ -614,14 +614,16 @@ preceded by a string “banner” that can be set by calling the setBanner metho
 mapping can also be supplied from ``Error`` values to exit codes using the
 ``setExitCodeMapper`` method:
 
-int main(int argc, char *argv[]) {
-  ExitOnErr.setBanner(std::string(argv[0]) + “ error:”);
-  ExitOnErr.setExitCodeMapper(
-    [](const Error &Err) {
-      if (Err.isA<BadFileFormat>())
-        return 2;
-      return 1;
-    });
+.. code-block:: c++
+
+  int main(int argc, char *argv[]) {
+    ExitOnErr.setBanner(std::string(argv[0]) + “ error:”);
+    ExitOnErr.setExitCodeMapper(
+      [](const Error &Err) {
+        if (Err.isA<BadFileFormat>())
+          return 2;
+        return 1;
+      });
 
 Use ``ExitOnError`` in your tool code where possible as it can greatly improve
 readability.