iOS Catching errors / Error handling

Discussion in 'Programming' started by Josepho, May 8, 2019.

  1. Josepho

    Josepho Member

    Joined:
    Nov 26, 2016
    Posts:
    38
    Hi I would like to know if there is any way to catch errors in game maker

    I know this exists
    https://yellowafterlife.itch.io/gamemaker-catch-error

    but it looks like its only for windows and i need a multiplatform solution if not, yoyo should work on it as its a very important feature in code languages.

    Many thanks :)

    Pd: Sorry if this is an already created topic i was not able to find it due to the key words -_- (errors, try, catch..)
     
  2. BaBiA Game Studio

    BaBiA Game Studio Member

    Joined:
    Jun 20, 2016
    Posts:
    862
    YYG already has it on their planned features list:
    • GML: exception support - try… catch… finally… and throw
    Got it from here:
    https://help.yoyogames.com/hc/en-us/articles/360022211472
     
  3. TsukaYuriko

    TsukaYuriko Q&A Spawn Camper Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    1,633
    To add to the above: A lot of functions return whether they succeeded. By performing checks against these return values to ensure that what you think should work actually did work, you can sort of implement error handling on a very fundamental level.
     
  4. Josepho

    Josepho Member

    Joined:
    Nov 26, 2016
    Posts:
    38
    Many thanks for your answers, im glad yoyo is working on it, its really needed
     
  5. Speederman

    Speederman Member

    Joined:
    Jun 23, 2016
    Posts:
    46
    I've found a way of doing this on Android: https://forum.yoyogames.com/index.php?threads/error-handling-and-capture.59666/#post-396016

    However, iOS Supporting Files are compiled, so there's not an easy way of modifying them... I think I've found the ShowMessage function in 'C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-<your-version>\ios\TemplateProject\${YYXCodeProjName}\Supporting Files\libyoyo_interpreted.a', but it should be decompiled, modified and compiled again to get it working. Maybe this tool could help with this, but I haven't tried it...
     
  6. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    1,959
    Didn't some programming language's userbase recently rebel against adding a try-catch feature? And it ended up being dropped? I recall one of the arguments thrown around was that "try() is a solution searching for a problem."
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice