RepositoryWriterImpl::_AddPackage(): more info in error messages
This commit is contained in:
@@ -311,13 +311,15 @@ RepositoryWriterImpl::_AddPackage(const BEntry& packageEntry)
|
|||||||
|
|
||||||
BPath packagePath;
|
BPath packagePath;
|
||||||
if ((result = packageEntry.GetPath(&packagePath)) != B_OK) {
|
if ((result = packageEntry.GetPath(&packagePath)) != B_OK) {
|
||||||
fListener->PrintError("can't get path for entry!\n");
|
fListener->PrintError("can't get path for entry '%s'!\n",
|
||||||
|
packageEntry.Name());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
BPackageReader packageReader(fListener);
|
BPackageReader packageReader(fListener);
|
||||||
if ((result = packageReader.Init(packagePath.Path())) != B_OK) {
|
if ((result = packageReader.Init(packagePath.Path())) != B_OK) {
|
||||||
fListener->PrintError("can't create package reader!\n");
|
fListener->PrintError("can't create package reader for '%s'!\n",
|
||||||
|
packagePath.Path());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,7 +335,8 @@ RepositoryWriterImpl::_AddPackage(const BEntry& packageEntry)
|
|||||||
GeneralFileChecksumAccessor checksumAccessor(packageEntry);
|
GeneralFileChecksumAccessor checksumAccessor(packageEntry);
|
||||||
BString checksum;
|
BString checksum;
|
||||||
if ((result = checksumAccessor.GetChecksum(checksum)) != B_OK) {
|
if ((result = checksumAccessor.GetChecksum(checksum)) != B_OK) {
|
||||||
fListener->PrintError("can't compute checksum!\n");
|
fListener->PrintError("can't compute checksum of file '%s'!\n",
|
||||||
|
packagePath.Path());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
fPackageInfo.SetChecksum(checksum);
|
fPackageInfo.SetChecksum(checksum);
|
||||||
|
|||||||
Reference in New Issue
Block a user