Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand <luke@xxxxxxxxxxx> wrote:
> On 5 June 2018 at 10:54, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand <luke@xxxxxxxxxxx> wrote:
> >> +                    m = re.search('Too many rows scanned \(over (\d+)\)', data)
> >> +                    if not m:
> >> +                        m = re.search('Request too large \(over (\d+)\)', data)
> >
> > Does 'p4' localize these error messages?
>
> That's a good question.
>
> It turns out that Perforce open-sourced the P4 client in 2014 (I only
> recently found this out) so we can actually look at the code now!
>
> Here's the code:
>
>     // ErrorId graveyard: retired/deprecated ErrorIds.

Hmm, the "too many rows" error you're seeing is retired/deprecated(?).

>     ErrorId MsgDb::MaxResults              = { ErrorOf( ES_DB, 32,
> E_FAILED, EV_ADMIN, 1 ), "Request too large (over %maxResults%); see
> 'p4 help maxresults'." } ;//NOTRANS
>     ErrorId MsgDb::MaxScanRows             = { ErrorOf( ES_DB, 61,
> E_FAILED, EV_ADMIN, 1 ), "Too many rows scanned (over %maxScanRows%);
> see 'p4 help maxscanrows'." } ;//NOTRANS
>
> I don't think there's actually a way to make it return any language
> other than English though. [...]
> So I think probably the language is always English.

The "NOTRANS" annotation on the error messages is reassuring.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux