[LNT] r238988 - Argument errors don't exist, so don't raise them
Chris Matthews
chris.matthews at apple.com
Tue Jun 9 17:07:14 PDT 2015
I think both work. The Python standard library uses TypeError for this sort of stuff.
Changed to ValueError in r239444.
> On Jun 4, 2015, at 3:10 AM, Daniel Sanders <daniel.sanders at imgtec.com> wrote:
>
> It looks like the value is the problem rather than the type so I think you may want ValueError.
>
>> -----Original Message-----
>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Chris Matthews
>> Sent: 04 June 2015 00:00
>> To: llvm-commits at cs.uiuc.edu
>> Subject: [LNT] r238988 - Argument errors don't exist, so don't raise them
>>
>> Author: cmatthews
>> Date: Wed Jun 3 18:00:23 2015
>> New Revision: 238988
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=238988&view=rev
>> Log:
>> Argument errors don't exist, so don't raise them
>>
>> Modified:
>> lnt/trunk/lnt/server/reporting/dailyreport.py
>>
>> Modified: lnt/trunk/lnt/server/reporting/dailyreport.py
>> URL: http://llvm.org/viewvc/llvm-
>> project/lnt/trunk/lnt/server/reporting/dailyreport.py?rev=238988&r1=23898
>> 7&r2=238988&view=diff
>> ==========================================================
>> ====================
>> --- lnt/trunk/lnt/server/reporting/dailyreport.py (original)
>> +++ lnt/trunk/lnt/server/reporting/dailyreport.py Wed Jun 3 18:00:23 2015
>> @@ -46,9 +46,9 @@ class DailyReport(object):
>> """
>>
>> if self.machine_runs is None:
>> - raise ArgumentError("report not initialized")
>> + raise TypeError("report not initialized")
>> if day_index >= self.num_prior_days_to_include:
>> - raise ArgumentError("invalid day index")
>> + raise TypeError("invalid day index")
>>
>> runs = self.machine_runs.get((machine.id, day_index))
>> if runs is None:
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list