Error handling for batch SQL

- Error handling for batch SQL ('little bit' defensive considering current batch parameters types).
- Related specifications.