Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-04

TPQConnection: Duplicated error message.

9 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers
to silvioprog
silvioprog wrote 6 lines

Well, I'd personnally rather would people to fix:
http://bugs.freepascal.org/view.php?id=20296
[FPC] Recent changes in dwarf crash heaptrc in lnfodwrf.pp that's been open since 2011 and if it still applies probably messes with my debugging which I'm not happy about as my bug free code writing abilities are not that great ;)

In other words: why are you posting your bugs on the mailing list when they'll show up in mantis anyway?

Regarding the content of your question in the bug: AFAIU it's for backward compatibility. The generic db error shows the error message. The specialized PostgreSQL error does the same, but also shows it in detail (perhaps, can't remember, there can be a list of multiple errors). I'm sure the guy who implemented this (I think Ludo Brands) can tell you exactly what's going on.

Michael Van Canneyt
to Reinier Olislagers
Reinier Olislagers wrote 24 lines
On 5-4-2013 8:52, silvioprog wrote: > Hello, > > Please see: > > http://bugs.freepascal.org/view.php?id=24229 > Well, I'd personnally rather would people to fix: http://bugs.freepascal.org/view.php?id=20296 [FPC] Recent changes in dwarf crash heaptrc in lnfodwrf.pp that's been open since 2011 and if it still applies probably messes with my debugging which I'm not happy about as my bug free code writing abilities are not that great ;) In other words: why are you posting your bugs on the mailing list when they'll show up in mantis anyway? Regarding the content of your question in the bug: AFAIU it's for backward compatibility. The generic db error shows the error message. The specialized PostgreSQL error does the same, but also shows it in detail (perhaps, can't remember, there can be a list of multiple errors). I'm sure the guy who implemented this (I think Ludo Brands) can tell you exactly what's going on.

I have changed it, but added an option so you can ask all information as it was.

Note that all parts of the error are always available as fields in the exception class.

Michael.

Mark Morgan Lloyd
to Michael Van Canneyt
Michael Van Canneyt wrote 9 lines
> Regarding the content of your question in the bug: AFAIU it's for > backward compatibility. The generic db error shows the error message. > The specialized PostgreSQL error does the same, but also shows it in > detail (perhaps, can't remember, there can be a list of multiple errors). > I'm sure the guy who implemented this (I think Ludo Brands) can tell you > exactly what's going on. I have changed it, but added an option so you can ask all information as it was.

Name of option please: is it a global or associated with the connection object?

Note that all parts of the error are always available as fields in the exception class.
Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Michael Van Canneyt
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 14 lines
Michael Van Canneyt wrote: >> Regarding the content of your question in the bug: AFAIU it's for >> backward compatibility. The generic db error shows the error message. >> The specialized PostgreSQL error does the same, but also shows it in >> detail (perhaps, can't remember, there can be a list of multiple errors). >> I'm sure the guy who implemented this (I think Ludo Brands) can tell you >> exactly what's going on. > > I have changed it, but added an option so you can ask all information as it > was. Name of option please: is it a global or associated with the connection object?

VerboseErrors property of TPQConnection

It's open source, You can look in the sources, you know this ? :)

Michael.

Ludo Brands
to Reinier Olislagers: Well, I'd personnally rather would people to fix:…
Reinier Olislagers wrote
> I'm sure the guy who implemented this (I think Ludo Brands) can tell you exactly what's going on.

Yes;)

The background of spitting out the complete error detail was people complaining about not getting the hints as they are used to when using PGAdmin3 or psql. Also there are many places in sqldb where the pg error is obfuscated by a generic sqldb message and where the PG returned error message has a lot of additional info and is not a duplicate.

Turning off the full info by default is in light of above imho a big step backwards. Usually people complain about getting not enough info. An option to get less info is fine but shouldn't be turned on by default.

Ludo

Michael Van Canneyt
to Ludo Brands
Ludo Brands wrote 15 lines
On 04/05/2013 09:10 AM, Reinier Olislagers wrote: >> I'm sure the guy who implemented this (I think Ludo Brands) can tell you > exactly what's going on. > Yes;) The background of spitting out the complete error detail was people complaining about not getting the hints as they are used to when using PGAdmin3 or psql. Also there are many places in sqldb where the pg error is obfuscated by a generic sqldb message and where the PG returned error message has a lot of additional info and is not a duplicate. Turning off the full info by default is in light of above imho a big step backwards. Usually people complain about getting not enough info.

The message contains still the original PostGres error message, of course I didn't delete that.

It is only the rest (hint, primary error, error code, error character etc.) that is disabled

An option to get less info is fine but shouldn't be turned on by default.

No problem. I've changed the default value of VerboseErrors to true. Rev. 24154.

Michael.

Mark Morgan Lloyd
to Michael Van Canneyt: VerboseErrors property of TPQConnection It's open source, You can look in the sources,…
Michael Van Canneyt wrote 22 lines
On Fri, 5 Apr 2013, Mark Morgan Lloyd wrote: > Michael Van Canneyt wrote: > >>> Regarding the content of your question in the bug: AFAIU it's for >>> backward compatibility. The generic db error shows the error message. >>> The specialized PostgreSQL error does the same, but also shows it in >>> detail (perhaps, can't remember, there can be a list of multiple >>> errors). >>> I'm sure the guy who implemented this (I think Ludo Brands) can tell >>> you >>> exactly what's going on. >> >> I have changed it, but added an option so you can ask all information >> as it was. > > Name of option please: is it a global or associated with the > connection object? VerboseErrors property of TPQConnection It's open source, You can look in the sources, you know this ? :)

Yes, I know- obviously. But I thought it worth asking while the point was in the forefront of both our minds, on the assumption that it would be quick for you to answer and equally quick for me to add a TODO in an open project where I'm relying on this behaviour :-)

It also makes sure that the information is available to anybody who gets to this thread via Google.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
silvioprog
to Michael Van Canneyt: The message contains still the original PostGres error message, of course I didn't delete…

2013/4/5 Michael Van Canneyt

Show quoted text 36 lines
On Fri, 5 Apr 2013, Ludo Brands wrote: > On 04/05/2013 09:10 AM, Reinier Olislagers wrote: > >> I'm sure the guy who implemented this (I think Ludo Brands) can tell you >>> >> exactly what's going on. >> > > Yes;) > > The background of spitting out the complete error detail was people > complaining about not getting the hints as they are used to when using > PGAdmin3 or psql. Also there are many places in sqldb where the pg error > is obfuscated by a generic sqldb message and where the PG returned error > message has a lot of additional info and is not a duplicate. > > Turning off the full info by default is in light of above imho a big > step backwards. Usually people complain about getting not enough info. > The message contains still the original PostGres error message, of course I didn't delete that. It is only the rest (hint, primary error, error code, error character etc.) that is disabled An option to get less info is fine but shouldn't be turned on by default. > No problem. I've changed the default value of VerboseErrors to true. Rev. 24154. Michael.

Worked like a charm, thank you very much! :)

Silvio Clécio My public projects - github.com/silvioprog