Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 892 for panics (0.16 sec)

  1. src/cmd/compile/internal/ssa/block.go

    }
    
    // AddControl appends a control value to the existing list of control values.
    func (b *Block) AddControl(v *Value) {
    	i := b.NumControls()
    	b.Controls[i] = v // panics if array is full
    	v.Uses++
    }
    
    // ReplaceControl exchanges the existing control value at the index provided
    // for the new value. The index must refer to a valid control value.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/syscall/exec_plan9.go

    	rest = buf[size:]
    	return
    }
    
    // StringSlicePtr converts a slice of strings to a slice of pointers
    // to NUL-terminated byte arrays. If any string contains a NUL byte
    // this function panics instead of returning an error.
    //
    // Deprecated: Use SlicePtrFromStrings instead.
    func StringSlicePtr(ss []string) []*byte {
    	bb := make([]*byte, len(ss)+1)
    	for i := 0; i < len(ss); i++ {
    		bb[i] = StringBytePtr(ss[i])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. src/math/bits/bits_test.go

    	// Test that 64-bit overflow panics fire correctly.
    	// These are designed to improve coverage of compiler intrinsics.
    	tests := []func(uint64, uint64) uint64{
    		func(a, b uint64) uint64 {
    			x, c := Add64(a, b, 0)
    			if c > 0 {
    				panic("overflow")
    			}
    			return x
    		},
    		func(a, b uint64) uint64 {
    			x, c := Add64(a, b, 0)
    			if c != 0 {
    				panic("overflow")
    			}
    			return x
    		},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 22 20:11:06 UTC 2020
    - 32.5K bytes
    - Viewed (0)
  4. src/cmd/go/internal/cfg/cfg.go

    // in the go/env file (for example GODEBUG), it panics.
    // This ensures that CanGetenv is accurate, so that
    // 'go env -w' stays in sync with what Getenv can retrieve.
    func Getenv(key string) string {
    	if !CanGetenv(key) {
    		switch key {
    		case "CGO_TEST_ALLOW", "CGO_TEST_DISALLOW", "CGO_test_ALLOW", "CGO_test_DISALLOW":
    			// used by internal/work/security_test.go; allow
    		default:
    			panic("internal error: invalid Getenv " + key)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:51 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  5. src/text/template/funcs.go

    	for name, fn := range in {
    		if !goodName(name) {
    			panic(fmt.Errorf("function name %q is not a valid identifier", name))
    		}
    		v := reflect.ValueOf(fn)
    		if v.Kind() != reflect.Func {
    			panic("value for " + name + " not a function")
    		}
    		if err := goodFunc(name, v.Type()); err != nil {
    			panic(err)
    		}
    		out[name] = v
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  6. cmd/generic-handlers.go

    		if globalLocalNodeName != "" {
    			w.Header().Set(xhttp.AmzRequestHostID, globalLocalNodeNameHex)
    		}
    		h.ServeHTTP(w, r)
    	})
    }
    
    // criticalErrorHandler handles panics and fatal errors by
    // `panic(logger.ErrCritical)` as done by `logger.CriticalIf`.
    //
    // It should be always the first / highest HTTP handler.
    func setCriticalErrorHandler(h http.Handler) http.Handler {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 06 01:01:15 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  7. src/log/slog/logger_test.go

    	}
    }
    
    // panicTextAndJsonMarshaler is a type that panics in MarshalText and MarshalJSON.
    type panicTextAndJsonMarshaler struct {
    	msg any
    }
    
    func (p panicTextAndJsonMarshaler) MarshalText() ([]byte, error) {
    	panic(p.msg)
    }
    
    func (p panicTextAndJsonMarshaler) MarshalJSON() ([]byte, error) {
    	panic(p.msg)
    }
    
    func TestPanics(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 10 21:25:30 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/builtin.go

    	"cmd/compile/internal/reflectdata"
    	"cmd/compile/internal/typecheck"
    	"cmd/compile/internal/types"
    )
    
    // Rewrite append(src, x, y, z) so that any side effects in
    // x, y, z (including runtime panics) are evaluated in
    // initialization statements before the append.
    // For normal code generation, stop there and leave the
    // rest to ssagen.
    //
    // For race detector, expand append(src, a [, b]* ) to
    //
    //	init {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  9. src/log/slog/handler.go

    			if v := reflect.ValueOf(v.any); v.Kind() == reflect.Pointer && v.IsNil() {
    				s.appendString("<nil>")
    				return
    			}
    
    			// Otherwise just print the original panic message.
    			s.appendString(fmt.Sprintf("!PANIC: %v", r))
    		}
    	}()
    
    	var err error
    	if s.h.json {
    		err = appendJSONValue(s, v)
    	} else {
    		err = appendTextValue(s, v)
    	}
    	if err != nil {
    		s.appendError(err)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 18:18:13 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  10. src/text/tabwriter/tabwriter.go

    func (b *Writer) handlePanic(err *error, op string) {
    	if e := recover(); e != nil {
    		if op == "Flush" {
    			// If Flush ran into a panic, we still need to reset.
    			b.reset()
    		}
    		if nerr, ok := e.(osError); ok {
    			*err = nerr.err
    			return
    		}
    		panic(fmt.Sprintf("tabwriter: panic during %s (%v)", op, e))
    	}
    }
    
    // Flush should be called after the last call to [Writer.Write] to ensure
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 16:46:34 UTC 2024
    - 17.8K bytes
    - Viewed (0)
Back to top