pkgman install: better out-of-memory error messages

This commit is contained in:
Ingo Weinhold 2013-04-20 21:47:35 +02:00
parent 7c092d4d86
commit adc49c411a

View File

@ -178,7 +178,7 @@ InstallCommand::Execute(int argc, const char* const* argv)
for (int32 i = 0; i < repositoryNameCount; i++) {
Repository* repository = new(std::nothrow) Repository;
if (repository == NULL || !otherRepositories.AddItem(repository))
DIE(B_NO_MEMORY, "out of memory");
DIE(B_NO_MEMORY, "failed to create/add repository object");
const BString& name = repositoryNames.StringAt(i);
error = repository->Init(roster, name);
@ -306,7 +306,7 @@ exit(1);
BString url = repository->Config().BaseURL();
BString fileName(package->Info().CanonicalFileName());
if (fileName.IsEmpty())
DIE(B_NO_MEMORY, "out of memory");
DIE(B_NO_MEMORY, "failed to allocate file name");
url << '/' << fileName;
BEntry entry;