Re: [Ur] Exceptions handling

2010-09-07 Thread Adam Chlipala
OK, I've pushed some changes to the public Mercurial repository linked from the Ur front page. There are two main changes relevant to this thread, based on the two main suggestions discussed here: - A function Basis.tryDml, for running DML in a way such that error messages can be processed

Re: [Ur] Exceptions handling

2010-09-06 Thread Vladimir Shabanov
2010/9/5 Adam Chlipala ad...@impredicative.com: I've started implementing this.  Everything works, save that the semantics differs between Postgres and MySQL/SQLite.  Postgres won't let you continue using a transaction after one command has failed, whereas MySQL and SQLite allow many errors

Re: [Ur] Exceptions handling

2010-09-06 Thread Adam Chlipala
Vladimir Shabanov wrote: So savepoint will be introduced only where it really needed (dml with user error handling)? I think that this is the best solution. Yes, that's what I meant. BTW it can be useful to have function for cancelling (and maybe restarting) transaction as a part of

Re: [Ur] Exceptions handling

2010-09-06 Thread Karn Kallio
Vladimir Shabanov wrote: So savepoint will be introduced only where it really needed (dml with user error handling)? I think that this is the best solution. Yes, that's what I meant. BTW it can be useful to have function for cancelling (and maybe restarting) transaction as a part of

Re: [Ur] Exceptions handling

2010-08-29 Thread Vladimir Shabanov
2010/8/24 Adam Chlipala ad...@impredicative.com: Vladimir Shabanov wrote: And there is another way to check DML errors -- another function dml' can be adder which returns option string instead of error page, e.g.     result- dml' (...);     case result of           None =  return ok