[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings exceed limit
From: |
Ben Pfaff |
Subject: |
Re: Warnings exceed limit |
Date: |
Sat, 16 Nov 2019 12:55:39 -0800 |
On Sat, Nov 16, 2019 at 12:27 PM Alan Mead <address@hidden> wrote:
>
> On 11/16/2019 1:14 PM, Ben Pfaff wrote:
>
> too_many_errors = true;
> if (m->severity == MSG_S_WARNING)
> submit_note (xasprintf (_("Warnings (%d) exceed limit (%d).
> Syntax processing will be halted."),
> n_msgs, max_msgs));
> else
> submit_note (xasprintf (_("Errors (%d) exceed limit (%d). Syntax
> processing will be halted."),
> n_msgs, max_msgs));
> }
> }
> }
>
>
> I don't understand this code:
>
> if (m->severity == MSG_S_WARNING)
> n_msgs += counts[MSG_S_ERROR];
>
>
> Why would a warning increase n_msgs by some count of errors?
>
> I'm sure it's because I read in some earlier version of the SPSS
> documentation that errors contribute toward the warning count for this
> purpose. It looks like this is no longer the case though.
>
>
> Upon reflection, a few other things occur to me. Those log messages may be
> misleading. I could get n-1 warnings and then 1 error and have processing
> stop with the message about errors, or vice-versa. Not a big deal, because
> this probably arises rarely.
There's plenty of room for improvement here, I agree.
> Also, how are message translations handled in PSPP? I see emails about "New
> Hungarian PO file for 'pspp' (version 1.2.0)" and I had the impression that
> all the user strings were extracted to a file (which is then translated) and,
> I assumed, referenced indirectly. Is it a problem that the source shows a
> specific (English-language) string?
This code is doing the translations OK. The _(...) syntax around the
strings is a function call to code that translates the
English-language strings into the user's selected language.
> And finally, if PSPP handled errors and warnings independently (and SPSS in
> batch mode did not), would that break anything? Do you think anyone is using
> PSPP in a way where halting is a feature? Like in a batch mode where if the
> syntax processed, then they do not check for warnings/errors? I think halting
> on potentially innocuous data problems is a far greater issue? I routinely
> read in test data and I might have hundreds of variables and hundreds of
> people. If the system that exports the data uses an odd symbol for missing (I
> have a client who outputs tab-delimited files with comma used as a missing
> data value) I might easily get hundreds of warnings about character data
> found where a numeric value was expected.
>
> I agree with Frans: Turning off warnings is a lot less useful than having
> PSPP show some warnings, suppress the rest but continue processing.
I think you're right. I'll figure out how to fix this up.
> "A human being should be able to change a diaper, plan an
> invasion, butcher a hog, conn a ship, design a building,
> write a sonnet, balance accounts, build a wall, set a bone,
> comfort the dying, take orders, give orders, cooperate,
> act alone, solve equations, analyze a new problem, pitch
> manure, program a computer, cook a tasty meal, fight
> efficiently, and die gallantly. Specialization is for
> insects."
Also a favorite quote of mine.
I have yet to plan an invasion, though.
- Warnings exceed limit, Frans Houweling, 2019/11/15
- Re: Warnings exceed limit, Frans Houweling, 2019/11/15
- Re: Warnings exceed limit, Ben Pfaff, 2019/11/15
- Re: Warnings exceed limit, Frans Houweling, 2019/11/16
- Re: Warnings exceed limit, Alan Mead, 2019/11/16
- Re: Warnings exceed limit, Frans Houweling, 2019/11/16
- Re: Warnings exceed limit, Alan Mead, 2019/11/16
- Re: Warnings exceed limit, Ben Pfaff, 2019/11/16
- Re: Warnings exceed limit, Alan Mead, 2019/11/16
- Re: Warnings exceed limit, Alan Mead, 2019/11/16
- Re: Warnings exceed limit,
Ben Pfaff <=
- Re: Warnings exceed limit, Ben Pfaff, 2019/11/16
- Re: Warnings exceed limit, Frans Houweling, 2019/11/16