Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 432 for panicIP (0.15 sec)

  1. src/internal/types/testdata/check/builtins0.go

    	_ = new(f1 /* ERROR "not a type" */ ())
    }
    
    func panic1() {
    	panic() // ERROR "not enough arguments"
    	panic(1, 2) // ERROR "too many arguments"
    	panic(0)
    	panic("foo")
    	panic(false)
    	panic(1<<10)
    	panic(1 << /* ERROR "constant shift overflow" */ 1000)
    	_ = panic /* ERROR "used as value" */ (0)
    
    	var s []byte
    	panic(s)
    	panic(s... /* ERROR "invalid use of ..." */ )
    }
    
    func panic2() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  2. src/internal/trace/base.go

    		if !yield(id, value) {
    			return false
    		}
    	}
    	return true
    }
    
    // mustGet returns the E for id or panics if it fails.
    //
    // This should only be used if id has already been validated.
    func (d *dataTable[EI, E]) mustGet(id EI) E {
    	data, ok := d.get(id)
    	if !ok {
    		panic(fmt.Sprintf("expected id %d in %T table", id, data))
    	}
    	return data
    }
    
    // frequency is nanoseconds per timestamp unit.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/instantiate.go

    // or whether the type arguments satisfy their constraints. Instantiate is
    // guaranteed to not return an error, but may panic. Specifically, for
    // *Signature types, Instantiate will panic immediately if the type argument
    // count is incorrect; for *Named types, a panic may occur later inside the
    // *Named API.
    func Instantiate(ctxt *Context, orig Type, targs []Type, validate bool) (Type, error) {
    	assert(len(targs) > 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. src/text/template/exec_test.go

    	}{
    		{
    			"direct func call panics",
    			"{{doPanic}}", (*T)(nil),
    			`template: t:1:2: executing "t" at <doPanic>: error calling doPanic: custom panic string`,
    		},
    		{
    			"indirect func call panics",
    			"{{call doPanic}}", (*T)(nil),
    			`template: t:1:7: executing "t" at <doPanic>: error calling doPanic: custom panic string`,
    		},
    		{
    			"direct method call panics",
    			"{{.GetU}}", (*T)(nil),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 60.1K bytes
    - Viewed (0)
  5. src/go/types/instantiate.go

    // or whether the type arguments satisfy their constraints. Instantiate is
    // guaranteed to not return an error, but may panic. Specifically, for
    // *Signature types, Instantiate will panic immediately if the type argument
    // count is incorrect; for *Named types, a panic may occur later inside the
    // *Named API.
    func Instantiate(ctxt *Context, orig Type, targs []Type, validate bool) (Type, error) {
    	assert(len(targs) > 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  6. 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)
  7. src/runtime/pprof/pprof.go

    // If a profile with that name already exists, NewProfile panics.
    // The convention is to use a 'import/path.' prefix to create
    // separate name spaces for each package.
    // For compatibility with various tools that read pprof data,
    // profile names should not contain spaces.
    func NewProfile(name string) *Profile {
    	lockProfiles()
    	defer unlockProfiles()
    	if name == "" {
    		panic("pprof: NewProfile with empty name")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go

    // MustDeref returns the type of the variable pointed to by t.
    // It panics if t's core type is not a pointer.
    //
    // TODO(adonovan): ideally this would live in typesinternal, but that
    // creates an import cycle. Move there when we melt this package down.
    func MustDeref(t types.Type) types.Type {
    	if ptr, ok := CoreType(t).(*types.Pointer); ok {
    		return ptr.Elem()
    	}
    	panic(fmt.Sprintf("%v is not a pointer", t))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. src/go/token/position.go

    // It ignores any alternative positions set using [File.AddLineColumnInfo].
    // LineStart panics if the 1-based line number is invalid.
    func (f *File) LineStart(line int) Pos {
    	if line < 1 {
    		panic(fmt.Sprintf("invalid line number %d (should be >= 1)", line))
    	}
    	f.mutex.Lock()
    	defer f.mutex.Unlock()
    	if line > len(f.lines) {
    		panic(fmt.Sprintf("invalid line number %d (should be < %d)", line, len(f.lines)))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  10. src/text/template/exec.go

    	Err error // Original error.
    }
    
    func (s *state) writeError(err error) {
    	panic(writeError{
    		Err: err,
    	})
    }
    
    // errRecover is the handler that turns panics into returns from the top
    // level of Parse.
    func errRecover(errp *error) {
    	e := recover()
    	if e != nil {
    		switch err := e.(type) {
    		case runtime.Error:
    			panic(e)
    		case writeError:
    			*errp = err.Err // Strip the wrapper.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
Back to top