Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Skovhede <kenneth@hexad.dk>2017-01-09 13:35:38 +0300
committerKenneth Skovhede <kenneth@hexad.dk>2017-01-09 13:35:38 +0300
commita0298904094582a0cae6be8defd623ad9d61ef10 (patch)
treea9676ec18df180e8c5758657d2fee38cddf1e108 /Duplicati/Library/Backend/GoogleServices
parentfc9f1b1dd36fd347904d58161d4556c5f2423f63 (diff)
Implemented better default error messsages
Diffstat (limited to 'Duplicati/Library/Backend/GoogleServices')
-rw-r--r--Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs4
-rw-r--r--Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs b/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs
index efb756a93..18a69bad5 100644
--- a/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs
+++ b/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs
@@ -93,7 +93,7 @@ namespace Duplicati.Library.Backend.GoogleCloudStorage
options.TryGetValue(STORAGECLASS_OPTION, out m_storage_class);
if (string.IsNullOrEmpty(authid))
- throw new Exception(Strings.GoogleCloudStorage.MissingAuthID(AUTHID_OPTION));
+ throw new UserInformationException(Strings.GoogleCloudStorage.MissingAuthID(AUTHID_OPTION));
m_oauth = new OAuthHelper(authid, this.ProtocolKey);
m_oauth.AutoAuthHeader = true;
@@ -201,7 +201,7 @@ namespace Duplicati.Library.Backend.GoogleCloudStorage
public void CreateFolder()
{
if (string.IsNullOrEmpty(m_project))
- throw new Exception(Strings.GoogleCloudStorage.ProjectIDMissingError(PROJECT_OPTION));
+ throw new UserInformationException(Strings.GoogleCloudStorage.ProjectIDMissingError(PROJECT_OPTION));
var data = System.Text.Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(new CreateBucketRequest() {
name = m_bucket,
diff --git a/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs b/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs
index 74bde3659..3aba941c7 100644
--- a/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs
+++ b/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs
@@ -76,7 +76,7 @@ namespace Duplicati.Library.Backend.GoogleDrive
curparent = CreateFolder(p, curparent).id;
}
else if (res.Length > 1)
- throw new Exception(Strings.GoogleDrive.MultipleEntries(p, curdisplay));
+ throw new UserInformationException(Strings.GoogleDrive.MultipleEntries(p, curdisplay));
else
curparent = res[0].id;
@@ -349,7 +349,7 @@ namespace Duplicati.Library.Backend.GoogleDrive
{
var files = GetFileEntries(oldname, true);
if (files.Length > 1)
- throw new Exception(string.Format(Strings.GoogleDrive.MultipleEntries(oldname, m_path)));
+ throw new UserInformationException(string.Format(Strings.GoogleDrive.MultipleEntries(oldname, m_path)));
var newfile = JsonConvert.DeserializeObject<GoogleDriveFolderItem>(JsonConvert.SerializeObject(files[0]));
newfile.title = newname;