• Javascript Catch Error

    From High Spirit@VERT/DCBBS to All on Fri Dec 15 10:44:03 2017
    Is there anyway to catch an error and prevent Synchronet from disconnectingãwhen the error occurs?ãã-- High Spirit Digital Realms Main - connect.digitalrealms.net 23ã Digital Realms C=64 - connect.digitalrealms.net 6400ãã---ã þ Synchronet þ Digital Creation BBS -- bbs.digitalcreationbbs.com:23ã
  • From echicken@VERT/ECBBS to High Spirit on Fri Dec 15 11:39:57 2017
    Re: Javascript Catch Errorã By: High Spirit to All on Fri Dec 15 2017 10:44:03ãã HS> Is there anyway to catch an error and prevent Synchronet fromã HS> disconnecting when the error occurs?ããTry to avoid situations where your script will throw an error. When youãcan't do that, wrap any code likely to generate an error in a try...catch:ããtry {ã throw 'this is an error';ã} catch (err) {ã log(err);ã}ããThere are often better ways of doing things, though. When doing file I/O forãexample, you can avoid most errors by checking whether a file exists, whetherãit was opened successfully, etc. before trying to do stuff with it.ãã---ãechickenãelectronic chicken bbs - bbs.electronicchicken.com - 416-273-7230ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã