Skip to content

Instantly share code, notes, and snippets.

@treed
Created August 19, 2009 21:20
Show Gist options
  • Save treed/170654 to your computer and use it in GitHub Desktop.
Save treed/170654 to your computer and use it in GitHub Desktop.
.namespace ['CardinalException']
.sub 'onload' :anon :init :load
.local pmc excproto, core_type, hll_type, interp
excproto = newclass 'CardinalException'
$P0 = get_class 'CardinalObject'
addparent excproto, $P0
$P0 = get_class ['parrot';'Exception']
addparent excproto, $P0
core_type = get_class 'Exception'
hll_type = get_class 'CardinalException'
interp = getinterp
interp.'hll_map'(core_type, hll_type)
$P0 = newclass 'NoMemoryError'
addparent $P0, excproto
$P0 = newclass 'ScriptError'
addparent $P0, excproto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment