diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-06-14 10:57:38 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-06-18 10:57:25 +0200 |
| commit | b1d926024ddded2a43cc182c2d97839bb528def4 (patch) | |
| tree | fe9992446242f7aa25fe1e8c2e8875b8da86dbfe /src/lib/buildgraph/productinstaller.cpp | |
| parent | 1d5c5e16a582401f5d1af299f95b57936db84593 (diff) | |
| download | qbs-b1d926024ddded2a43cc182c2d97839bb528def4.tar.gz | |
Some minor improvements to the Error class.
- Rename "Error" to "ErrorInfo", to make clear that this class conveys
information about errors, including that there might not actually be
one.
- Rename "ErrorData" to "ErrorItem", to make clear that these are parts
of an aggregate structure.
- Introduce ErrorInfo::hasError() for quick checking of whether an error
occurred.
Change-Id: Icea6ed5240d6d14bd30e9cea189c6babd7004792
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/productinstaller.cpp')
| -rw-r--r-- | src/lib/buildgraph/productinstaller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/buildgraph/productinstaller.cpp b/src/lib/buildgraph/productinstaller.cpp index 93ac80ffa..468f79f9d 100644 --- a/src/lib/buildgraph/productinstaller.cpp +++ b/src/lib/buildgraph/productinstaller.cpp @@ -56,16 +56,16 @@ ProductInstaller::ProductInstaller(const TopLevelProjectPtr &project, if (m_options.removeExistingInstallation()) { const QString cfp = installRootFileInfo.canonicalFilePath(); if (cfp == QFileInfo(QDir::rootPath()).canonicalFilePath()) - throw Error(Tr::tr("Refusing to remove root directory.")); + throw ErrorInfo(Tr::tr("Refusing to remove root directory.")); if (cfp == QFileInfo(QDir::homePath()).canonicalFilePath()) - throw Error(Tr::tr("Refusing to remove home directory.")); + throw ErrorInfo(Tr::tr("Refusing to remove home directory.")); } return; } if (m_options.installIntoSysroot()) { if (m_options.removeExistingInstallation()) - throw Error(Tr::tr("Refusing to remove sysroot.")); + throw ErrorInfo(Tr::tr("Refusing to remove sysroot.")); m_options.setInstallRoot(PropertyFinder().propertyValue(project->buildConfiguration(), QLatin1String("qbs"), QLatin1String("sysroot")).toString()); } else { @@ -116,7 +116,7 @@ void ProductInstaller::removeInstallRoot() void ProductInstaller::copyFile(const Artifact *artifact) { if (m_observer->canceled()) { - throw Error(Tr::tr("Installation canceled for configuration '%1'.") + throw ErrorInfo(Tr::tr("Installation canceled for configuration '%1'.") .arg(m_products.first()->project->topLevelProject()->id())); } const QString relativeInstallDir @@ -148,7 +148,7 @@ void ProductInstaller::copyFile(const Artifact *artifact) void ProductInstaller::handleError(const QString &message) { if (!m_options.keepGoing()) - throw Error(message); + throw ErrorInfo(message); m_logger.qbsWarning() << message; } |
