in whisk/wskerror.go [118:137]
func MakeWskErrorFromWskError(baseError error, whiskError error, exitCode int, flags ...bool) (resWhiskError *WskError) {
// Get the exit code, and flags from the existing Whisk error
if whiskError != nil {
// Ensure the Whisk error is a pointer
switch errorType := whiskError.(type) {
case *WskError:
resWhiskError = errorType
case WskError:
resWhiskError = &errorType
}
if resWhiskError != nil {
exitCode, flags = getWhiskErrorProperties(resWhiskError, flags...)
}
}
return MakeWskError(baseError, exitCode, flags...)
}