panic

rust-like panics in haxe
https://github.com/hackx2/panic

To install, run:

haxelib install panic 1.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

panic

Rust's panic, todo, unimplemented, and unreachable macro method implementation for Haxe.

[!IMPORTANT] On sys targets, -D panic.throw, throws instead of panicking.

usage

function main() {
	panic("hi!"); /* hi! */ panic(); /* explicit panic */
	todo("todo!"); /* not yet implemented: todo! */ todo(); /* not yet implemented */
	unimplemented("sure"); /* not implemented: sure */ unimplemented(); /* not implemented */
	unreachable("okay"); /* internal error: entered unreachable code: okay */ unreachable(); /* internal error: entered unreachable code */
}

meta

metadesc
:panic.skipSkips Fixer macro processing for this class/abstract
:panic.bypassForces the Fixer macro to rewrite to panic.Funcs, ignoring any local methods with the same name
Contributors
hackx2
Version
1.0.0
Published
2 weeks ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂