code: func NewStateEx() *State {
  	l := NewState()
  	if l != nil {
  		_ = AtPanic(l, func(l *State) int {
  			s, _ := l.ToString(-1)
  			fmt.Fprintf(os.Stderr, "PANIC: unprotected error in call to Lua API (%s)\n", s)
  			return 0
  		})
  	}
  	return l
  }
docs: // NewStateEx creates a new Lua state. It calls NewState and then sets a panic
  // function that prints an error message to the standard error output in case
  // of fatal errors.
  //
  // Returns the new state.