     public function Process() {
       instance = this
       connect(function (): void {
-        handle_uncaught_errors()
+        listen_for_uncaught_errors()
         main()
       })
     }

    public function get stdout(): OutputStream { return stdout_socket }
    public function get stderr(): OutputStream { return stderr_socket }

    private function handle_uncaught_errors(): void {
      loaderInfo.uncaughtErrorEvents.addEventListener(
        UncaughtErrorEvent.UNCAUGHT_ERROR,
        function (event: UncaughtErrorEvent): void {
          warn(event.error.stack)
        }
      )
    }

    private function connect(callback: Function): void {

package stdio {
  import flash.display.Sprite
  import flash.events.*
  import flash.net.*

  public class Process extends Sprite {
