Index: dart/utils/apidoc/apidoc.dart |
diff --git a/dart/utils/apidoc/apidoc.dart b/dart/utils/apidoc/apidoc.dart |
index 5405e3a7233c26f995614c55be3e409a7bb3a8cf..8b1258245eb13c7c6344908e9772ed8cac4c66cf 100644 |
--- a/dart/utils/apidoc/apidoc.dart |
+++ b/dart/utils/apidoc/apidoc.dart |
@@ -150,7 +150,11 @@ void main() { |
.then((_) => apidoc.documentLibraries(apidocLibraries, libPath, pkgPath)) |
.then((_) => compileScript(mode, outputDir, libPath)) |
.then((_) => print(apidoc.status)) |
- .catchError((e) => print('Error: generation failed: ${e.error}')) |
+ .catchError((e) { |
+ print('Error: generation failed: ${e}'); |
+ apidoc.cleanup(); |
+ exit(1); |
+ }) |
.whenComplete(() => apidoc.cleanup()); |
}); |
} |