func (t *TestSuite) BeforeAll() { gorgasm.Verbose = true gorgasm.Debug = true // Create rendering loop control channels t.rlControl = newRenderLoopControl() // Start the rendering loop loop.GoRecoverable( t.renderLoopFunc(t.rlControl), func(rs loop.Recoverings) (loop.Recoverings, error) { for _, r := range rs { gorgasm.Logf("%s", r.Reason) gorgasm.Logf("%s", gorgasm.Stacktrace()) } return rs, fmt.Errorf("Unrecoverable loop\n") }, ) // Start the event loop loop.GoRecoverable( t.eventLoopFunc(t.rlControl), func(rs loop.Recoverings) (loop.Recoverings, error) { for _, r := range rs { gorgasm.Logf("%s", r.Reason) gorgasm.Logf("%s", gorgasm.Stacktrace()) } return rs, fmt.Errorf("Unrecoverable loop\n") }, ) }
func check() { error := gl.GetError() if error != 0 { gorgasm.Logf("An error occurred! Code: 0x%x", error) } }