cataclysm

Haxe & C++ Crashlogger For OpenFL
https://github.com/TheRealJake12/Cataclysm.git

To install, run:

haxelib install cataclysm 1.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Cataclysm - An OpenFL Crash Logger For C++ Targets.

What is this?

Cataclysm Is An Open-Source Crash Handler / Logger For OpenFL Applications.

I Designed This To Be Used Alongside Cataclysmic Engine, A Friday Night Funkin' Engine.

Key Features

Highly Informative Crash Logger That Includes The Following Information: - App Title - App Company - App Package(???) - App Build Number - How Long The App Was Open - When The App Crashed - Error Type - Error Message - Stack Log For Knowing What Lines Specifically Crashed The App

How Do I Use This?

First, Ensure Your Haxe Version Is Atleast 4.3.6 Or Higher. Next, Make Sure These Libraries Are Moderately Up-To-Date.

openfl >= 9.4.1
lime >= 8.2.2
hxcpp >= 4.3.2

Now, Install The Library. haxelib git cataclysm https://github.com/TheRealJake12/cataclysm.git

In Your Project.xml, Add The Haxelib Define. <haxelib name="cataclysm"/>

NOTICE

THERE ARE SOME PERFORMANCE DOWNSIDES TO USING CATACLYSM.

Due To HXCPP Being Funny With Error Handling, Cataclysm Defines The Following To Try And Catch Errors.

<haxedef name="HXCPP_CHECK_POINTER" />
<haxedef name="HXCPP_CATCH_SEGV" />
<haxedef name="HXCPP_STACK_LINE" />
<haxedef name="HXCPP_STACK_TRACE" />
<haxedef name="openfl-enable-handle-error" />

It Shouldn't Slow Things Down Too Much Though.

Initializing Cataclysm

In Your Main.hx Or Alternative, Import cataclysm.Cataclysm;

import cataclysm.Cataclysm;

Then After Your App Has Initialized, Add The Following:

var crash_handler:Cataclysm = new Cataclysm();
crash_handler.setup("crashlogs", "AppName");

The First Argument Of setup Is Where The Logs Are Saved. crashlogs Will Output The Logs At bin/crashlogs. The Second Argument Is The Title Of The Log (In Addition To The Date And Time Of The Crash).

An Example Of This Would Be Cataclysm-Crashlog_2025-04-24_19-39-46.

There Is Also An Optional Callback onApplicationCrash That You Can Call Whenever Cataclysm Has Detected A Crash.

It Works As Following:

var crash_handler:Cataclysm = new Cataclysm();
crash_handler.setup("crashlogs", "AppName");
crash_handler.onApplicationCrash = function()
{
trace("The App Has Crashed. Check The Logs Folder For More Info...");
};

Thank You For Using Cataclysm, If You Have Any Features Or Additions You Want To Add Or Suggest, Feel Free To Do So.

Credits

therealjake_12 - Writing 99% Of Cataclysm

Lars Doucet - Writing Crashdumper (Which This Is Inspired From) And That One Date To String Function

Contributors
therealjake_12
Version
1.0.0
Published
1 year ago
Dependencies
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

⌂