- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 104 for panics (0.12 sec)
-
src/bytes/buffer.go
// another n bytes. After Grow(n), at least n bytes can be written to the // buffer without another allocation. // If n is negative, Grow will panic. // If the buffer can't grow it will panic with [ErrTooLarge]. func (b *Buffer) Grow(n int) { if n < 0 { panic("bytes.Buffer.Grow: negative count") } m := b.grow(n) b.buf = b.buf[:m] } // Write appends the contents of p to the buffer, growing the buffer as
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } type panicReader struct{ panic bool } func (r panicReader) Read(p []byte) (int, error) { if r.panic { panic("oops") } return 0, io.EOF } // Make sure that an empty Buffer remains empty when // it is "grown" before a Read that panics func TestReadFromPanicReader(t *testing.T) { // First verify non-panic behaviour var buf Buffer
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
doc/go1.17_spec.html
</pre> <h3 id="Handling_panics">Handling panics</h3> <p> Two built-in functions, <code>panic</code> and <code>recover</code>, assist in reporting and handling <a href="#Run_time_panics">run-time panics</a> and program-defined error conditions. </p> <pre class="grammar"> func panic(interface{}) func recover() interface{} </pre> <p>
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 10 18:25:45 UTC 2024 - 211.6K bytes - Viewed (0) -
doc/go_spec.html
of the location. </p> <h3 id="Handling_panics">Handling panics</h3> <p> Two built-in functions, <code>panic</code> and <code>recover</code>, assist in reporting and handling <a href="#Run_time_panics">run-time panics</a> and program-defined error conditions. </p> <pre class="grammar"> func panic(interface{}) func recover() interface{} </pre> <p>
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 00:58:01 UTC 2024 - 282.5K bytes - Viewed (0) -
src/bytes/bytes.go
// // It panics if count is negative or if the result of (len(b) * count) // overflows. func Repeat(b []byte, count int) []byte { if count == 0 { return []byte{} } // Since we cannot return an error on overflow, // we should panic if the repeat will generate an overflow. // See golang.org/issue/16237. if count < 0 { panic("bytes: negative Repeat count") }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
CHANGELOG/CHANGELOG-1.31.md
- K8s.io/apimachinery/pkg/util/runtime: Added support for new calls to handle panics and errors in the context where they occur. `PanicHandlers` and `ErrorHandlers` now must accept a context parameter for that. Log output is structured instead of unstructured. ([#121970](https://github.com/kubernetes/kubernetes/pull/121970), [@po...
Registered: Fri Nov 01 09:05:11 UTC 2024 - Last Modified: Wed Oct 23 12:18:32 UTC 2024 - 315.4K bytes - Viewed (0) -
CHANGELOG/CHANGELOG-1.29.md
- Fixes a 1.29.0 regression that introduced a possible data race that could cause panics in kube-controller-manager and kube-scheduler ([#124518](https://github.com/kubernetes/kubernetes/pull/124518), [@wojtek-t](https://github.com/wojtek-t)) [SIG API Machinery and Scheduling]
Registered: Fri Nov 01 09:05:11 UTC 2024 - Last Modified: Wed Oct 23 04:37:31 UTC 2024 - 375.1K bytes - Viewed (1) -
android/guava-testlib/src/com/google/common/collect/testing/Helpers.java
List<?> exp = copyToList(expected); List<?> act = copyToList(actual); String actString = act.toString(); // Of course we could take pains to give the complete description of the // problem on any failure. // Yeah it's n^2. for (Object object : exp) { if (!act.remove(object)) { fail(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 17.5K bytes - Viewed (0) -
src/cmd/api/main_test.go
} func (w *Walker) emitf(format string, args ...any) { f := strings.Join(w.scope, ", ") + ", " + fmt.Sprintf(format, args...) if strings.Contains(f, "\n") { panic("feature contains newlines: " + f) } if _, dup := w.features[f]; dup { panic("duplicate feature inserted: " + f) } w.features[f] = true if verbose { log.Printf("feature: %s", f) } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 31.4K bytes - Viewed (0) -
internal/bpool/bpool.go
// byte arrays sized based on width. func NewBytePoolCap(maxSize uint64, width int, capwidth int) (bp *BytePoolCap) { if capwidth <= 0 { panic("total buffer capacity must be provided") } if capwidth < 64 { panic("buffer capped with smaller than 64 bytes is not supported") } if width > capwidth { panic("minimum buffer length cannot be > capacity of the buffer") } return &BytePoolCap{ c: make(chan []byte, maxSize),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 3K bytes - Viewed (0)