Link Search Menu Expand Document

Error Handling

Table of contents


Overview

To get error event firstly register to ChatControllerDelegate then implement didFailWithError method.

BLDChatErrorType: To get BLDChatErrorType options open BLDError.h file.

func didFailWithError(_ error: BLDError!) {
    switch error.type {
    case GeneralErrorType:
        print("GeneralErrorType")
    case BLDChatErrorTypeFailedToStart:
        print("BLDChatErrorTypeFailedToStart")
    case BLDChatErrorTypeFailedToFinish:
        print("BLDChatErrorTypeFailedToFinish")
    case BLDChatErrorTypeFailedToSubmitForm:
        print("BLDChatErrorTypeFailedToSubmitForm")
    default:
        break
    }
}

Note: BLDError contains NSError object that reflects the relevant error data.