Giter VIP home page Giter VIP logo

fetchr's People

Contributors

grantjbutler avatar

Watchers

 avatar  avatar

fetchr's Issues

Allow Execution of JavaScript Files

Allow users to pass in a JavaScript file to execute, and output the results to the command line (probably as JSON, or some other standardized serialized format).

Handle Objective-C Exceptions

Current, Objective-C exception take down the application when thrown (see below example). Handle exceptions and return them as errors to the command line.

2015-02-11 10:38:49.553 fetchr[51631:4021541] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath  not found in entity <NSSQLEntity Post id=12>'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff93c9566c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff964a176e objc_exception_throw + 43
    2   CoreData                            0x00007fff8e4ae7e6 -[NSSQLGenerator newSQLStatementForRequest:ignoreInheritance:countOnly:nestingLevel:] + 1238
    3   CoreData                            0x00007fff8e3997ad -[NSSQLAdapter _newSelectStatementWithFetchRequest:ignoreInheritance:] + 365
    4   CoreData                            0x00007fff8e399435 -[NSSQLCore newRowsForFetchPlan:] + 117
    5   CoreData                            0x00007fff8e398c98 -[NSSQLCore objectsForFetchRequest:inContext:] + 520
    6   CoreData                            0x00007fff8e3986fb -[NSSQLCore executeRequest:withContext:error:] + 299
    7   CoreData                            0x00007fff8e44d0f9 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 3945
    8   CoreData                            0x00007fff8e45731b gutsOfBlockToNSPersistentStoreCoordinatorPerform + 171
    9   libdispatch.dylib                   0x00007fff8df19c13 _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x00007fff8df1ae5e _dispatch_barrier_sync_f_invoke + 57
    11  CoreData                            0x00007fff8e446312 _perform + 194
    12  CoreData                            0x00007fff8e398395 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 533
    13  CoreData                            0x00007fff8e396beb -[NSManagedObjectContext executeFetchRequest:error:] + 587
    14  fetchr                              0x00000001066aad17 -[GJBFetchr executeFetchRequest:] + 199
    15  CoreFoundation                      0x00007fff93b6e3cc __invoking___ + 140
    16  CoreFoundation                      0x00007fff93b6e222 -[NSInvocation invoke] + 290
    17  JavaScriptCore                      0x00007fff8bf42791 _ZN3JSC24ObjCCallbackFunctionImpl4callEP9JSContextP13OpaqueJSValuemPKPKS3_PS6_ + 417
    18  JavaScriptCore                      0x00007fff8bf42326 _ZN3JSCL34objCCallbackFunctionCallAsFunctionEPK15OpaqueJSContextP13OpaqueJSValueS4_mPKPKS3_PS6_ + 262
    19  JavaScriptCore                      0x00007fff8bf42e25 _ZN3JSC19APICallbackFunction4callINS_20ObjCCallbackFunctionEEExPNS_9ExecStateE + 517
    20  JavaScriptCore                      0x00007fff8bb6f824 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 452
    21  JavaScriptCore                      0x00007fff8bf2f873 llint_entry + 22733
    22  JavaScriptCore                      0x00007fff8bf29d81 callToJavaScript + 311
    23  JavaScriptCore                      0x00007fff8beaf103 _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 35
    24  JavaScriptCore                      0x00007fff8bb521bc _ZN3JSC11Interpreter7executeEPNS_17ProgramExecutableEPNS_9ExecStateEPNS_8JSObjectE + 8796
    25  JavaScriptCore                      0x00007fff8bb4fd84 _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueEPS5_ + 484
    26  JavaScriptCore                      0x00007fff8bb4faaa JSEvaluateScript + 394
    27  JavaScriptCore                      0x00007fff8bed22e9 -[JSContext evaluateScript:withSourceURL:] + 105
    28  fetchr                              0x00000001066a7ee4 -[GJBApplicationDelegate application:runWithArguments:] + 8436
    29  fetchr                              0x00000001066aa5cb -[DDCliApplication runWithDelegate:arguments:] + 427
    30  fetchr                              0x00000001066aa89b -[DDCliApplication runWithClass:] + 283
    31  fetchr                              0x00000001066aab13 DDCliAppRunWithClass + 99
    32  fetchr                              0x00000001066aab53 DDCliAppRunWithDefaultClass + 19
    33  fetchr                              0x00000001066a8a86 main + 38
    34  libdyld.dylib                       0x00007fff8e0795c9 start + 1
    35  ???                                 0x0000000000000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

FetchRequest Constructor is Broken

See this DevForums post for a solution. Things should work correctly on 10.10. This fix is most likely just for 10.9 and below (for whichever platforms support the JavaScriptCore Objective-C API).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.