You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: supervisor_task_example_test.go
    path of file: ./repos/iris/core/host
    
    the code of the file until where you have to start completion: // white-box testing
package host

import (
	"context"
	"fmt"
	"net/http"
	"time"
)

func ExampleSupervisor_RegisterOnError() {
	su := New(&http.Server{Addr: ":8273", Handler: http.DefaultServeMux})

	su.RegisterOnError(func(err error) {
		fmt.Println(er
    
func ExampleSupervisor_RegisterOnError() {
	su := New(&http.Server{Addr: ":8273", Handler: http.DefaultServeMux})

	su.RegisterOnError(func(err error) {
		fmt.Println(err.Error())
	})

	su.RegisterOnError(func(err error) {
		fmt.Println(err.Error())
	})

	su.RegisterOnError(func(err error) {
		fmt.Println(err.Error())
	})

	go su.ListenAndServe()
	time.Sleep(1 * time.Second)
	if err := su.Shutdown(context.TODO()); err != nil {
		panic(err)
	}
	time.Sleep(1 * time.Second)

	// Output:
	// http: Server closed
	// http: Server closed
	// http: Server closed
}