HaxeFoundation / hxcpp

Runtime files for c++ backend for haxe
Other
295 stars 184 forks source link

stack trace has no line info (also how to get full stack trace?) #1012

Open mgood7123 opened 1 year ago

mgood7123 commented 1 year ago

with debug build

    function loadHost()
    {
        try {
            // ...
            var source = File.getBytes(HOST_SCRIPT);
            var module = Module.fromData(source.getData());
            if (module != null) {
                // ...
                trace("calling createUI() for instance of " + HOST_SCRIPT);
                host_ui = host.createUI();
                trace("adding UI for " + HOST_SCRIPT);
                host_ui_container.addChild(host_ui);
            } else {
                trace("ERROR: host script '" + HOST_SCRIPT + "' failed to load");
            }
        } catch (e:Exception) {
            trace("ERROR: loadHost()");
            showError(e);
        }
    }
        function showError(e:Exception) {
        trace("!!!!!!!!!!!!!ERROR!!!!!!!!!!!!!");

        var m = "exception: " + e;

        if (e != null) {
            m += "\n\nmessage: ";
            m += Std.string(e.message);
            m += "\n\nnative: ";
            m += Std.string(e.native);
            m += "\n\ndetails: ";
            m += Std.string(e.details());
            m += "\n\nstack: ";
            m += Std.string(e.stack);
        }

        trace(m);

                // show the contents of `m` on-screen via Label gui component

image

image