本文整理汇总了Java中org.robovm.apple.foundation.NSError.getLocalizedDescription方法的典型用法代码示例。如果您正苦于以下问题:Java NSError.getLocalizedDescription方法的具体用法?Java NSError.getLocalizedDescription怎么用?Java NSError.getLocalizedDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.robovm.apple.foundation.NSError
的用法示例。
在下文中一共展示了NSError.getLocalizedDescription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: restoreCompletedTransactionsFailed
import org.robovm.apple.foundation.NSError; //导入方法依赖的package包/类
/**
* Called when an error occur while restoring purchases. Notify the user
* about the error.
*
* @param queue
* @param error
*/
@Override
public void restoreCompletedTransactionsFailed(SKPaymentQueue queue, NSError error) {
if (error.getErrorCode() != SKErrorCode.PaymentCancelled) {
status = IAPPurchaseNotificationStatus.RestoredFailed;
message = error.getLocalizedDescription();
NSNotificationCenter.getDefaultCenter().postNotification(IAPPurchaseNotification, this);
}
}
示例2: displayError
import org.robovm.apple.foundation.NSError; //导入方法依赖的package包/类
private void displayError(NSError error) {
if (error != null) {
UIAlertView alert = new UIAlertView("Error", error.getLocalizedDescription(), null, "OK");
alert.show();
}
}
示例3: handleError
import org.robovm.apple.foundation.NSError; //导入方法依赖的package包/类
/**
* Reports any error with an alert which was received from connection or
* loading failures.
*
* @param error
*/
private void handleError(NSError error) {
String errorMessage = error.getLocalizedDescription();
UIAlertView alertView = new UIAlertView("Cannot Show Top Paid Apps", errorMessage, null, "OK");
alertView.show();
}