Closed aaronjanse closed 3 years ago
Depends on #85.
main.go eventually needs to be refactored. In this PR:
main.go
$SESSION_DIR/crash
Best way to test this is by applying the following diff to vterm/stdout.go
vterm/stdout.go
diff --git a/vterm/stdout.go b/vterm/stdout.go index e6edf7c..7f49250 100644 --- a/vterm/stdout.go +++ b/vterm/stdout.go @@ -2,8 +2,10 @@ package vterm import ( "bufio" + "fmt" "log" "sync/atomic" + "time" "github.com/aaronjanse/3mux/ecma48" ) @@ -64,6 +66,10 @@ func (v *VTerm) ProcessStdout(input *bufio.Reader) { break } + if time.Now().Second() == 0 { + panic(fmt.Errorf("FORCED")) + } + // log.Printf(":: %q", output.Raw) switch x := output.Parsed.(type) {
This is a draft PR until I test it a little more later tonight
I'm currently writing a much much cleaner solution for error handling, where every err return value is checked during the boot process, with helpful error messages and manual exits instead of messy panics
err
Depends on #85.
main.go
eventually needs to be refactored. In this PR:$SESSION_DIR/crash
Best way to test this is by applying the following diff to
vterm/stdout.go
This is a draft PR until I test it a little more later tonight