1

クライアントで処理された例外をサーバーに報告するために、いくつかの API (Crittercism) に取り組んでいます。

クライアント API はNSException、入力パラメーターとして受け取ります。API を呼び出す前 に、いくつかのアプリケーション コンテキスト情報 string( NSString) も追加する必要があります。NSException

Objective-C を使用してそれを行う方法。

NSString* appContextString;


NSString *test = @"test";
unichar a;
int index = 5;

@try {
    a = [test characterAtIndex:index];
}
@catch (NSException *exception) {
    // add app context to exception before reporting to Crittercism.
    [Crittercism logHandledException:exception]; 
}

appContextString を例外に追加する必要があります。

4

2 に答える 2