pkgman install: better out-of-memory error messages
This commit is contained in:
@@ -178,7 +178,7 @@ InstallCommand::Execute(int argc, const char* const* argv)
|
|||||||
for (int32 i = 0; i < repositoryNameCount; i++) {
|
for (int32 i = 0; i < repositoryNameCount; i++) {
|
||||||
Repository* repository = new(std::nothrow) Repository;
|
Repository* repository = new(std::nothrow) Repository;
|
||||||
if (repository == NULL || !otherRepositories.AddItem(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);
|
const BString& name = repositoryNames.StringAt(i);
|
||||||
error = repository->Init(roster, name);
|
error = repository->Init(roster, name);
|
||||||
@@ -306,7 +306,7 @@ exit(1);
|
|||||||
BString url = repository->Config().BaseURL();
|
BString url = repository->Config().BaseURL();
|
||||||
BString fileName(package->Info().CanonicalFileName());
|
BString fileName(package->Info().CanonicalFileName());
|
||||||
if (fileName.IsEmpty())
|
if (fileName.IsEmpty())
|
||||||
DIE(B_NO_MEMORY, "out of memory");
|
DIE(B_NO_MEMORY, "failed to allocate file name");
|
||||||
url << '/' << fileName;
|
url << '/' << fileName;
|
||||||
|
|
||||||
BEntry entry;
|
BEntry entry;
|
||||||
|
|||||||
Reference in New Issue
Block a user