zoukankan      html  css  js  c++  java
  • unrecognized selector sent to instance 0x10b34e810


    一个错误:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLError isEqualToString:]: unrecognized selector sent to instance 0x10b34e810'
    *** First throw call stack:


    (lldb) po 0x10b34e810
    Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo=0x10a582670 {NSUnderlyingError=0x10a664e90 "Could not connect to the server.", NSErrorFailingURLStringKey=
    , NSLocalizedDescription=Could not connect to the server.}

    打印了0x10b34e810对象,怀疑NSError *error强制转成string类型的不成功




    在这里挂掉了。

    。。

    (lldb) po (NSString*)error
    Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo=0x10a5223a0 {NSUnderlyingError=0x10b181140 "Could not connect to the server.", NSErrorFailingURLStringKey=, NSLocalizedDescription=Could not connect to the server.}


    总结:数值基本类型的能够转,nsobject类型的不能够强制转(一般普通的基本类型能够强制转化。

    int,float能够转成string   。

    对象类型的是不是不能够转化啊。。

    比方nsurl的不能够转成string。。nserror也不能够转成string)多么主要的常识丫,还总是忘了。




    版权声明:本文博主原创文章,博客,未经同意不得转载。

  • 相关阅读:
    CODEVS4650 破损的键盘
    洛谷P1656 炸铁路
    洛谷 P3225 [HNOI2012]矿场搭建
    1265 四点共面
    1406: [AHOI2007]密码箱
    1193: [HNOI2006]马步距离
    1800: [Ahoi2009]fly 飞行棋
    1923: [Sdoi2010]外星千足虫
    I
    2017CCPC秦皇岛G ZOJ 3987Numbers(大数+贪心)
  • 原文地址:https://www.cnblogs.com/yxwkf/p/4858602.html
Copyright © 2011-2022 走看看