Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for formatError (0.29 sec)

  1. src/image/jpeg/huffman.go

    	for n > 0 {
    		if n < 17 {
    			return FormatError("DHT has wrong length")
    		}
    		if err := d.readFull(d.tmp[:17]); err != nil {
    			return err
    		}
    		tc := d.tmp[0] >> 4
    		if tc > maxTc {
    			return FormatError("bad Tc value")
    		}
    		th := d.tmp[0] & 0x0f
    		// The baseline th <= 1 restriction is specified in table B.5.
    		if th > maxTh || (d.baseline && th > 1) {
    			return FormatError("bad Th value")
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. src/debug/macho/fat.go

    			return nil, ErrNotFat
    		} else {
    			return nil, &FormatError{0, "invalid magic number", nil}
    		}
    	}
    	offset := int64(4)
    
    	// Read the number of FatArchHeaders that come after the fat_header.
    	var narch uint32
    	err = binary.Read(sr, binary.BigEndian, &narch)
    	if err != nil {
    		return nil, &FormatError{offset, "invalid fat_header", nil}
    	}
    	offset += 4
    
    	if narch < 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. src/debug/plan9obj/file.go

    type Sym struct {
    	Value uint64
    	Type  rune
    	Name  string
    }
    
    /*
     * Plan 9 a.out reader
     */
    
    // formatError is returned by some operations if the data does
    // not have the correct format for an object file.
    type formatError struct {
    	off int
    	msg string
    	val any
    }
    
    func (e *formatError) Error() string {
    	msg := e.msg
    	if e.val != nil {
    		msg += fmt.Sprintf(" '%v'", e.val)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  4. src/debug/macho/file.go

    	Sect  uint8
    	Desc  uint16
    	Value uint64
    }
    
    /*
     * Mach-O reader
     */
    
    // FormatError is returned by some operations if the data does
    // not have the correct format for an object file.
    type FormatError struct {
    	off int64
    	msg string
    	val any
    }
    
    func (e *FormatError) Error() string {
    	msg := e.msg
    	if e.val != nil {
    		msg += fmt.Sprintf(" '%v'", e.val)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  5. src/image/jpeg/scan.go

    func (d *decoder) processSOS(n int) error {
    	if d.nComp == 0 {
    		return FormatError("missing SOF marker")
    	}
    	if n < 6 || 4+2*d.nComp < n || n%2 != 0 {
    		return FormatError("SOS has wrong length")
    	}
    	if err := d.readFull(d.tmp[:n]); err != nil {
    		return err
    	}
    	nComp := int(d.tmp[0])
    	if n != 4+2*nComp {
    		return FormatError("SOS length inconsistent with number of components")
    	}
    	var scan [maxComponents]struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 00:46:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  6. src/image/png/reader.go

    	// transparency, as opposed to palette transparency.
    	useTransparent bool
    	transparent    [6]byte
    }
    
    // A FormatError reports that the input is not a valid PNG.
    type FormatError string
    
    func (e FormatError) Error() string { return "png: invalid format: " + string(e) }
    
    var chunkOrderError = FormatError("chunk out of order")
    
    // An UnsupportedError reports that the input uses a valid but unimplemented PNG feature.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
  7. src/image/jpeg/reader.go

    package jpeg
    
    import (
    	"image"
    	"image/color"
    	"image/internal/imageutil"
    	"io"
    )
    
    // A FormatError reports that the input is not a valid JPEG.
    type FormatError string
    
    func (e FormatError) Error() string { return "invalid JPEG format: " + string(e) }
    
    // An UnsupportedError reports that the input uses a valid but unimplemented JPEG feature.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  8. src/debug/elf/file.go

    	}
    
    	if shoff < 0 {
    		return nil, &FormatError{0, "invalid shoff", shoff}
    	}
    	if phoff < 0 {
    		return nil, &FormatError{0, "invalid phoff", phoff}
    	}
    
    	if shoff == 0 && shnum != 0 {
    		return nil, &FormatError{0, "invalid ELF shnum for shoff=0", shnum}
    	}
    
    	if shnum > 0 && shstrndx >= shnum {
    		return nil, &FormatError{0, "invalid ELF shstrndx", shstrndx}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:49:58 UTC 2024
    - 43.1K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/util/apiclient/wait.go

    			if err != nil {
    				lastError = formatError(fmt.Sprintf("error: %v", err))
    				return false, err
    			}
    			resp, err := client.Do(req)
    			if err != nil {
    				lastError = formatError(fmt.Sprintf("error: %v", err))
    				return false, nil
    			}
    			defer func() {
    				_ = resp.Body.Close()
    			}()
    			if resp.StatusCode != http.StatusOK {
    				lastError = formatError(fmt.Sprintf("status code: %d", resp.StatusCode))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 01 07:10:31 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. cmd/admin-handlers-idp-config.go

    			// If we got an LDAP validation error, we need to send appropriate
    			// error message back to client (likely mc).
    			writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigLDAPValidation),
    				validationErr.FormatError(), r.URL)
    			return
    		}
    
    		writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), err.Error(), r.URL)
    		return
    	}
    
    	// Update the actual server config on disk.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top