Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

DML exceptions: Difference between revisions

From MoodleDocs
(→‎dml_read_exception: fix read -> write)
(One intermediate revision by one other user not shown)
Line 3: Line 3:
==Overview==
==Overview==
[[Image:Dml_exceptions.png]]
[[Image:Dml_exceptions.png]]
Defined in lib/dmllib.php for now.


===dml_connection_exception===
===dml_connection_exception===
Line 10: Line 12:
Problem occurred during reading from database. Originally indicated be returning ''false'' - this value was often confused with ''false'' return value meaning ''not found''.
Problem occurred during reading from database. Originally indicated be returning ''false'' - this value was often confused with ''false'' return value meaning ''not found''.


===dml_read_exception===
===dml_write_exception===
Problem occurred during writing to database. Originally indicated be returning ''false''.
Problem occurred during writing to database. Originally indicated be returning ''false''.



Revision as of 21:23, 30 November 2008

Moodle 2.0

In previous versions problems in database calls were ignored by default.

Overview

Dml exceptions.png

Defined in lib/dmllib.php for now.

dml_connection_exception

Thrown when can not connect to database for any reason.

dml_read_exception

Problem occurred during reading from database. Originally indicated be returning false - this value was often confused with false return value meaning not found.

dml_write_exception

Problem occurred during writing to database. Originally indicated be returning false.

See also

  • Exceptions: General guidelines for using of exceptions in Moodle 2.0
  • DML functions: Where all the functions used to handle DB data. (DML) are defined.
  • DDL functions: Where all the functions used to handle DB objects (DDL) are defined.