mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
MDL-20636 Reveiw all throw statements.
This commit is contained in:
parent
f7970e3ca7
commit
88f0eb1546
15 changed files with 56 additions and 80 deletions
|
@ -98,7 +98,7 @@ abstract class question_state {
|
|||
}
|
||||
}
|
||||
if (empty($states)) {
|
||||
throw new Exception('unknown summary state ' . $summarystate);
|
||||
throw new coding_exception('unknown summary state ' . $summarystate);
|
||||
}
|
||||
return $states;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ abstract class question_state {
|
|||
* @return int the new state.
|
||||
*/
|
||||
public function corresponding_commented_state($fraction) {
|
||||
throw new Exception('Unexpected question state.');
|
||||
throw new coding_exception('Unexpected question state.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -295,7 +295,7 @@ class question_state_notstarted extends question_state {
|
|||
return false;
|
||||
}
|
||||
public function get_state_class($showcorrectness) {
|
||||
throw new Exception('Unexpected question state.');
|
||||
throw new coding_exception('Unexpected question state.');
|
||||
}
|
||||
}
|
||||
class question_state_unprocessed extends question_state {
|
||||
|
@ -303,7 +303,7 @@ class question_state_unprocessed extends question_state {
|
|||
return false;
|
||||
}
|
||||
public function get_state_class($showcorrectness) {
|
||||
throw new Exception('Unexpected question state.');
|
||||
throw new coding_exception('Unexpected question state.');
|
||||
}
|
||||
}
|
||||
class question_state_todo extends question_state {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue