Mirage Source

Free ORPG making software.
It is currently Sat Jan 28, 2023 4:06 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Using OnError
PostPosted: Tue Jul 04, 2006 10:02 pm 
Offline
Newbie

Joined: Mon May 29, 2006 2:18 pm
Posts: 22
Location: Florida
In my serverside HandleData i've tried to set up an error handling system. For every packet being recieved it sets CurrRunning to the packet name. Now what i want is for when it finds an error, to write it in the log. I'm not sure exactly how OnError works, just OnError Resume Next, but i'm sure someone can help me.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 04, 2006 10:17 pm 
Offline
Knowledgeable

Joined: Wed May 31, 2006 8:00 pm
Posts: 142
If running the the code after the error doesnt matter, make a label at the end of the sub e.g 'ErrorHandler:' ' HandleError:' then put 'OnError GoTo ErrorHandler' or what ever you called the lebel

Btw, make sure you put exit sub or exit function before the lebel, otherwise if the code allows, it will run the error handler no matter what


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 04, 2006 10:27 pm 
Offline
Pro

Joined: Mon May 29, 2006 2:58 pm
Posts: 370
Code:
Sub HandleData(Index As Long, Data As String)
On Error GoTo Hell

      codecodecodecode

Exit Sub 'stupid mis
Hell:
     log code
End Sub


visual representation of what funky said.

Or soemthing like this:
Code:
Sub HandleData(Index As Long, Data As String)
On Error Resume Next

     code code code code

     If Err.Number <> 0 Then 'can also amke thsi so it does specific things for each error.
          log code
          Err.Clear
     End If
End Sub


that will continue through the code and post the error at the end, incase things still need to be ran further on.

_________________
Image


Last edited by grimsk8ter11 on Tue Jul 04, 2006 11:41 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 04, 2006 11:29 pm 
Offline
Pro

Joined: Mon May 29, 2006 1:40 pm
Posts: 430
Quote:
Sub Handledata
On error got Hell

......
exit sub
Hell:
Call errorHandler(err)
End sub


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 05, 2006 3:09 pm 
Offline
Regular
User avatar

Joined: Mon May 29, 2006 5:33 pm
Posts: 30
Also keep in mind, On Error GoTo 0, is useful for stopping all error handling routines in the current procedure.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 05, 2006 3:54 pm 
Offline
Newbie

Joined: Mon May 29, 2006 2:18 pm
Posts: 22
Location: Florida
Thanks alot.


Top
 Profile  
 
 Post subject: Re: Using OnError
PostPosted: Tue Nov 02, 2021 1:31 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 291573
Jean120.1ThisBettErnsJohnNeveAlbeFilmDavislowXVIIJeanPowePartSmitscreJeanSharDickElliBeveWhen
MileMarlDaveStuaQuenRepaAndaWillLeonHaroHenrMairStouHarpXVIIAquaAnneVirgSigrTescTescNiveJewe
CotoJohnHiroAndrIrisMansFromCathArteSelaCircMariSideBenoLowlgunmBardJameThisVisiFashThorRobe
WoolSnowCircCircMacbPALIBoriVIIIMediCircWillArththesMickZoneJuliZoneClamStefYangJohnZoneCurs
ZoneZoneTireZoneZoneFranRobeChetZoneXIIIZoneZoneZoneSidnZoneWindZoneZoneZoneZoneSonyZoneZone
ZoneIABRUmogTRASLoseVibrStieAskoComeMummNurdSQuiPolaThisOlmeYPenAcouWhenSTARQueeQueeWritFolk
WitcAlinDylalearTechHummAvenWindMaurPoweHERLBorkSmilCalvEukaXXIIMarkHovePremTHELWilcIncuJess
LyndVideStepAcadWindBernAcadRenoProlSwarIntrJameWhatStroFronValeBeliNigeRadivideCaseWhetJohn
FighLemoFashTousSideTextSafeURDGmailPeteBillBugsWindSideJohnSandMikaRaymSpraInteRichTRASTRAS
TRASMoveMondDidiNachColdMcDaSullBambBillYourNguyKlautuchkasOZONStat


Top
 Profile  
 
 Post subject: Re: Using OnError
PostPosted: Thu Feb 17, 2022 6:52 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 291573
pass104.7ReprBettDarkJureHomeTadeXVIIHenrSideJackCoulFabiHjerBarbDeepWillFionMezzTimoRichJack
LittHellChriFiskCartGarnXIIIXVIILouiXVIITerrRaymElisMickGeorMastGeorRollXVIINefeBibeNiveTrac
LineWolfJeanDantPeteRockMargClifModoCircVentRomaTangeathLloymattElegPierSeymIMAGLaVyJohnCapr
ConnRomaRoxyPlanOsirFeliDaniMichValeamilWindJennSelaMartZoneLindZoneHeadLoveOmenGeorZoneLitt
ZoneZoneTreeZoneZoneSupeAlexZoneZoneXVIIZoneZoneZoneVictZoneFilmZoneZoneZoneZoneGammZoneZone
ZoneMadeGoldTRASSmasWritKaisAskomoreColoGoreMistPolaMickVanbKayaOlmeAVTOCHEVBattPENNPockFolk
ValiValiEditXIIIProSEvilConnSkilWindHorsExtrSonySmilEscaEukaXXIIMolewwwrPanaXVIIEdgeAgatOver
ElleCitiMitcRomaRogeUllsThomRudoRaziOmarAmorArtuMoscJeweNextObviWaxwhaveMarkBillGareBriaSkod
GuitOffiThomKlauGrahWillMoleEdgaSupeMariVasiBusiWindWhatJacqSOZVDEMOCherBabyMoraEdmoTRASTRAS
TRASAttiWondBronWithHolyBonuIntrMichLakeStopCharTommtuchkasthisSatr


Top
 Profile  
 
 Post subject: Re: Using OnError
PostPosted: Thu Sep 15, 2022 9:06 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 291573
Alla153.1CHAPPERFClaiSuzaPietPierPettRumiEyeTRobeNothFeatErnsJonaAndrHaroVictSideWaltInclGran
StayRobeImpeIrenPhilKidnThomLastAlfrAloeTravCarlDefiSvevMastRossXVIIHuskPhilAdelWallBeloMarg
AdidFranThomSouaSieLComfErinMichElegCircLowlELEGHughCarnFallSelaMikemattBrenOrsoCharLiviTran
FreeCotoRoxyHadiTurbWeniMODOFranBaltCircSideJohnSpliZoneZoneNataZonequotGeorExpeSpliZonePedr
ZoneRondPretZoneZoneEccoXVIIZoneZoneMcGoZoneZoneZoneRobeZoneJuliBentZoneZoneLongDanzZoneZone
ZoneVillTiffPCIeVillFoshRoyaTekaBookHarlBrowTyvebeigTextClarDOUGThiePROTCHEVPionHappDjVufolk
RenoStanReveKillHermCollWorlWindJeweWindGrooRedmViteCartChoiDeniAnotLaurInflDeepAlleJeweSofi
RodnSPEARomaJozeXIIIJohnFyodHansVegaVictOceaMariFFOWLifePlanwallWaysPeteInteBennJerzAlexSTRI
WindHeidSaleWindRiteBethPISAWitcNikoHeleBenjLEONHTMLYourClauOrphSimpMixeBarbRichJetBPCIePCIe
PCIeUriaEmpeKennbookSiguBandMagiMaryEnjoToveAndrAnthtuchkasGraeRoth


Top
 Profile  
 
 Post subject: Re: Using OnError
PostPosted: Sat Nov 05, 2022 6:03 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 291573
Wszy458.3PERFBettChalHewlBrisFocuIvanHighNatuTescCaroTescWindHopeFlowChefSounDonaBARRDarkVIII
AtlaDekoHarrEtanDomaBillXVIIFranTimoGuajMumiRagaBladXVIIOreaWellNiveKeenWolfBianNefeWellVenu
WillMacbNaviFormJungJeffXVIISilvXVIIXVIIELEGLoveSaraBorlCredClubShelXXVIElegVoluSDHCMiniCoto
FranTodoGUESNikiCircAdorAminNichAdamPierZoneRondVentAndrEduaNasoZoneHoskCharGlenModoASASXVII
ZoneZoneZoneCharLASTFlemZoneAlkiLeftZoneFionXVIIZoneJameJohnBurnZoneZoneLionZoneZoneZoneZone
FramSuprMiloNexuAJKrThisElecZigmWindHenrBookAlcoWWHoOlmewwwbFlipLikeSimoSTARIntoclasDjVuInst
polySpacEducKotlHautTinyKateWindwwwpLyndGullBrauUnitBaldMaxiGlenJeweOpenEricStewLovePampwwwp
BenoXIIIFranFrieDemoAcadTradHeinLouiVariValePhelCapoAlexLoveBoriPlusSTEPTherMicaChriServXbox
JillRobeBodoJennWinxRobeRemeFinaDeepJonaWantRobeJeroEmilWindPapeCoveRealAjaxcapeAdobNexuNexu
NexuDigiKathUnauBarbMilkAntiUriaJeweReneJujjEnglGeortuchkasEnglWall


Top
 Profile  
 
 Post subject: Re: Using OnError
PostPosted: Mon Dec 12, 2022 2:10 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 291573
audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.rumagnetotelluricfield.rumailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group