Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for NumError (0.17 sec)

  1. src/strconv/atof_test.go

    	for i := range atoftests {
    		test := &atoftests[i]
    		if test.err != nil {
    			test.err = &NumError{"ParseFloat", test.in, test.err}
    		}
    	}
    	for i := range atof32tests {
    		test := &atof32tests[i]
    		if test.err != nil {
    			test.err = &NumError{"ParseFloat", test.in, test.err}
    		}
    	}
    
    	// Generate random inputs for tests and benchmarks
    	if testing.Short() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 16:24:57 UTC 2022
    - 23.6K bytes
    - Viewed (0)
  2. src/database/sql/convert.go

    			return nil
    		}
    	}
    
    	return fmt.Errorf("unsupported Scan, storing driver.Value type %T into type %T", src, dest)
    }
    
    func strconvErr(err error) error {
    	if ne, ok := err.(*strconv.NumError); ok {
    		return ne.Err
    	}
    	return err
    }
    
    func asString(src any) string {
    	switch v := src.(type) {
    	case string:
    		return v
    	case []byte:
    		return string(v)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. src/fmt/scan.go

    		f, err := strconv.ParseFloat(str[:p], n)
    		if err != nil {
    			// Put full string into error.
    			if e, ok := err.(*strconv.NumError); ok {
    				e.Num = str
    			}
    			s.error(err)
    		}
    		m, err := strconv.Atoi(str[p+1:])
    		if err != nil {
    			// Put full string into error.
    			if e, ok := err.(*strconv.NumError); ok {
    				e.Num = str
    			}
    			s.error(err)
    		}
    		return math.Ldexp(f, m)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  4. src/flag/flag_test.go

    		_ = fs.Int64("int64", 0, "")
    		_ = fs.Uint("uint", 0, "")
    		_ = fs.Uint64("uint64", 0, "")
    		_ = fs.Float64("float64", 0, "")
    		// Strings cannot give errors, and bools and durations do not return strconv.NumError.
    		err := fs.Parse([]string{arg})
    		if err == nil {
    			t.Errorf("Parse(%q)=%v; expected range error", arg, err)
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:38:24 UTC 2024
    - 22K bytes
    - Viewed (0)
  5. src/math/big/int_test.go

    		var x Int
    		_, ok := x.SetString(s, 0)
    		if !ok {
    			t.Errorf("SetString(%s, 0) failed", s)
    			continue
    		}
    
    		want, err := strconv.ParseInt(s, 0, 64)
    		if err != nil {
    			if err.(*strconv.NumError).Err == strconv.ErrRange {
    				if x.IsInt64() {
    					t.Errorf("IsInt64(%s) succeeded unexpectedly", s)
    				}
    			} else {
    				t.Errorf("ParseInt(%s) failed", s)
    			}
    			continue
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"FormatInt", Func, 0},
    		{"FormatUint", Func, 0},
    		{"IntSize", Const, 0},
    		{"IsGraphic", Func, 6},
    		{"IsPrint", Func, 0},
    		{"Itoa", Func, 0},
    		{"NumError", Type, 0},
    		{"NumError.Err", Field, 0},
    		{"NumError.Func", Field, 0},
    		{"NumError.Num", Field, 0},
    		{"ParseBool", Func, 0},
    		{"ParseComplex", Func, 15},
    		{"ParseFloat", Func, 0},
    		{"ParseInt", Func, 0},
    		{"ParseUint", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  7. src/net/http/h2_bundle.go

    		if n1 < n || n1 > maxVal {
    			// n+v overflows
    			n = 1<<64 - 1
    			err = strconv.ErrRange
    			goto Error
    		}
    		n = n1
    	}
    
    	return n, nil
    
    Error:
    	return n, &strconv.NumError{Func: "ParseUint", Num: string(s0), Err: err}
    }
    
    // Return the first number n such that n*base >= 1<<64.
    func http2cutoff64(base int) uint64 {
    	if base < 2 {
    		return 0
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  8. api/go1.txt

    pkg strconv, func UnquoteChar(string, uint8) (int32, bool, string, error)
    pkg strconv, method (*NumError) Error() string
    pkg strconv, type NumError struct
    pkg strconv, type NumError struct, Err error
    pkg strconv, type NumError struct, Func string
    pkg strconv, type NumError struct, Num string
    pkg strconv, var ErrRange error
    pkg strconv, var ErrSyntax error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
  9. api/go1.14.txt

    pkg net/http/httptest, type Server struct, EnableHTTP2 bool
    pkg net/textproto, method (MIMEHeader) Values(string) []string
    pkg strconv, method (*NumError) Unwrap() error
    pkg syscall (windows-386), const CTRL_CLOSE_EVENT = 2
    pkg syscall (windows-386), const CTRL_CLOSE_EVENT ideal-int
    pkg syscall (windows-386), const CTRL_LOGOFF_EVENT = 5
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 508.9K bytes
    - Viewed (0)
Back to top