[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-vm-dev
Subject:    [Vm-dev] Custom module primitive error codes
From:       monty <monty2 () programmer ! net>
Date:       2017-09-06 11:12:02
Message-ID: trinity-43dde25d-15f5-46b4-bf56-c3358aa03879-1504696322847 () 3c-app-mailcom-lxa04
[Download RAW message or body]

 
#primitiveFailFor: can be used to signal a primitive failure with an integer error \
code. The VM can map a small set of these codes to symbols like #'bad argument' that \
can be checked for in <primitive:...error:> methods.

How should a module primitive use #primitiveFailFor: with its own custom error codes, \
so that they don't collide with the VM's current and future set of PrimErr* codes? \
This RSqueak issue says to use negative integers for application-specific errors: \
https://github.com/HPI-SWA-Lab/RSqueak/issues/130

Is that preferred for modules?


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic