Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Oct 10, 2023
1 parent 22ed6b2 commit 6cf77de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2022 Picovoice Inc.
// Copyright 2022-2023 Picovoice Inc.
// You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
// file accompanying this source.
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ViewController: UIViewController, UITextViewDelegate {
startButton.setTitle("STOP", for: UIControl.State.normal)

} catch let error as PorcupineInvalidArgumentError {
showErrorAlert(message: "\(error.localizedDescription)\nEnsure your accessKey '\(accessKey)' is valid")
showErrorAlert(message: "\(error.localizedDescription)")
} catch is PorcupineActivationError {
showErrorAlert(message: "AccessKey activation error")
} catch is PorcupineActivationRefusedError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class ViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSo
isListening = true
startButton.setTitle("STOP", for: UIControl.State.normal)
} catch let error as PorcupineInvalidArgumentError {
showErrorAlert("\(error.localizedDescription)\nEnsure your accessKey '\(accessKey)' is valid")
showErrorAlert("\(error.localizedDescription)")
} catch is PorcupineActivationError {
showErrorAlert("AccessKey activation error")
} catch is PorcupineActivationRefusedError {
Expand Down

0 comments on commit 6cf77de

Please sign in to comment.