pkgman install: better out-of-memory error messages
This commit is contained in:
parent
7c092d4d86
commit
adc49c411a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user