How to find where NSInvalidArgumentException (“data parameter is nil”) get's thrown?

前端 未结 2 1662
轻奢々
轻奢々 2021-01-27 17:54

I\'m writing an iPad App and today I realized, that there\'s something wrong when there\'s no internet connection.

I get this very informative error:

相关标签:
2条回答
  • 2021-01-27 18:41

    In XCode you can add the Exception-Breakpoint which will halt the application right before it crashes fataly. You should give this one a try, if it works as it should, it will pause right on the line of code, that crashes your app.

    How to add the exception-breakpoint

    0 讨论(0)
  • 2021-01-27 18:43

    Use spring 3 version

    Spring configuration : springService.xml

    <context:component-scan base-package=" com.service.impl" />
    
    <!-- Scheduler : Initial delay =5 minutes (5*60000 seconds) and repeat interval= 5 minutes-->
        <task:annotation-driven executor="myExecutor"
            scheduler="myScheduler" />
        <task:executor id="myExecutor" pool-size="1" />
        <task:scheduler id="myScheduler" pool-size="1" />
    
        <task:scheduled-tasks scheduler="myScheduler">
            <task:scheduled ref="batchUpdateServiceImpl"
                method="updateMe" fixed-delay="300000" initial-delay="300000"/>
            <task:scheduled ref="batchUpdateServiceImpl"
                method="updateYou"
                fixed-delay="300000"  initial-delay="300000"/>
        </task:scheduled-tasks>
    
    
    
    Package Code :
    com.service.impl
    
    Class Name:
    @Service
    public class BatchUpdateServiceImpl {
        public void updateMe(){
        System.out.println(“update me”);
        }
        public void updateYou(){
        System.out.println(“update You”);
        }
    
    }
    
    Web.xml :
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
                /WEB-INF/springService.xml
            </param-value>
      </context-param>
    
    0 讨论(0)
提交回复
热议问题