Sunday, November 19, 2017

#1 2016-10-06 10:19:02 am

StevenH
Member
Registered: 2016-09-17
Posts: 29

Crash catching

Hey there.

Sometimes while developing I stumble upon crashes (mostly self made by adressing methods wrong or something else) where the whole ui stops working with a crash log in the log view. I can fix all of them but I was wonduring if there is a way to catch those errors like with try/error for applescript to let the app continue its work.

Steven

Offline

 

#2 2016-10-06 07:43:20 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5175

Re: Crash catching

In short, alas no.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#3 2016-10-07 02:54:53 am

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2724
Website

Re: Crash catching

StevenH wrote:

if there is a way to catch those errors like with try/error for applescript to let the app continue its work.


In Long: What you're looking for is exception handling and not error handling. In Objective-C you need to create the exception at compile time. This way the compiler create special routines so when an exception occurs the program can unwind the stack and continue executing. Error handling is at an much higher level and is not able to avoid crashing only responding to bad or unexpected results.

Offline

 

#4 2016-10-08 10:16:17 am

StevenH
Member
Registered: 2016-09-17
Posts: 29

Re: Crash catching

Thank you for both replies

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)