Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Oct 7, 2023
1 parent 5e003b2 commit aedd8a5
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions binding/ios/Porcupine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,31 +248,31 @@ public class Porcupine {
_ message: String,
_ messageStack: [String] = []) -> PorcupineError {
switch status {
case PV_STATUS_OUT_OF_MEMORY:
return PorcupineMemoryError(message, messageStack)
case PV_STATUS_IO_ERROR:
return PorcupineIOError(message, messageStack)
case PV_STATUS_INVALID_ARGUMENT:
return PorcupineInvalidArgumentError(message, messageStack)
case PV_STATUS_STOP_ITERATION:
return PorcupineStopIterationError(message, messageStack)
case PV_STATUS_KEY_ERROR:
return PorcupineKeyError(message, messageStack)
case PV_STATUS_INVALID_STATE:
return PorcupineInvalidStateError(message, messageStack)
case PV_STATUS_RUNTIME_ERROR:
return PorcupineRuntimeError(message, messageStack)
case PV_STATUS_ACTIVATION_ERROR:
return PorcupineActivationError(message, messageStack)
case PV_STATUS_ACTIVATION_LIMIT_REACHED:
return PorcupineActivationLimitError(message, messageStack)
case PV_STATUS_ACTIVATION_THROTTLED:
return PorcupineActivationThrottledError(message, messageStack)
case PV_STATUS_ACTIVATION_REFUSED:
return PorcupineActivationRefusedError(message, messageStack)
default:
let pvStatusString = String(cString: pv_status_to_string(status))
return PorcupineError("\(pvStatusString): \(message)", messageStack)
case PV_STATUS_OUT_OF_MEMORY:
return PorcupineMemoryError(message, messageStack)
case PV_STATUS_IO_ERROR:
return PorcupineIOError(message, messageStack)
case PV_STATUS_INVALID_ARGUMENT:
return PorcupineInvalidArgumentError(message, messageStack)
case PV_STATUS_STOP_ITERATION:
return PorcupineStopIterationError(message, messageStack)
case PV_STATUS_KEY_ERROR:
return PorcupineKeyError(message, messageStack)
case PV_STATUS_INVALID_STATE:
return PorcupineInvalidStateError(message, messageStack)
case PV_STATUS_RUNTIME_ERROR:
return PorcupineRuntimeError(message, messageStack)
case PV_STATUS_ACTIVATION_ERROR:
return PorcupineActivationError(message, messageStack)
case PV_STATUS_ACTIVATION_LIMIT_REACHED:
return PorcupineActivationLimitError(message, messageStack)
case PV_STATUS_ACTIVATION_THROTTLED:
return PorcupineActivationThrottledError(message, messageStack)
case PV_STATUS_ACTIVATION_REFUSED:
return PorcupineActivationRefusedError(message, messageStack)
default:
let pvStatusString = String(cString: pv_status_to_string(status))
return PorcupineError("\(pvStatusString): \(message)", messageStack)
}
}

Expand Down

0 comments on commit aedd8a5

Please sign in to comment.