diff --git a/source/dub/dub.d b/source/dub/dub.d index 030411b..e904398 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -200,6 +200,8 @@ generator.generate(settings); } + /// Executes tests on the current project. Throws an exception, if + /// unittests failed. void testProject(GeneratorSettings settings, string config, Path custom_main_file) { if (custom_main_file.length && !custom_main_file.absolute) custom_main_file = getWorkingDirectory() ~ custom_main_file; diff --git a/source/dub/packagemanager.d b/source/dub/packagemanager.d index 28ee980..3b07da5 100644 --- a/source/dub/packagemanager.d +++ b/source/dub/packagemanager.d @@ -339,7 +339,8 @@ auto type = fi.isDirectory ? Journal.Type.Directory : Journal.Type.RegularFile; if (!journal.containsEntry(type, fpath.relativeTo(pack.path))) - throw new Exception("Untracked file found, aborting package removal, file: " ~ fpath.toNativeString()); + throw new Exception("Untracked file found, aborting package removal, file: " + ~ fpath.toNativeString() ~ "\nYou can forcefully remove this package."); } } checkFilesRec(pack.path); diff --git a/source/dub/project.d b/source/dub/project.d index aa67e52..86f7146 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -665,7 +665,7 @@ enforce(p !is null, "Could not find package candidate for "~pkg~" "~reqDep.dependency.toString()); markUpToDate(basepkg); } - catch(Throwable e) { + catch(Exception e) { logError("Failed to retrieve metadata for package %s: %s", pkg, e.msg); logDiagnostic("Full error: %s", e.toString().sanitize()); }