Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
PHP
/
Exceptions
Which expression wraps $error while preserving it as the programmatic cause?
from Exceptions
PHP 8.3.33
intermediate
1 min
Which expression wraps $error while preserving it as the programmatic cause?
throw new OrderException($error->getMessage());
throw new OrderException("Order failed", 0, $error);
throw new OrderException((string) $error);
throw new OrderException("Order failed", $error->getCode());
Check
Ask AI about this kata
Report an error
previous kata
Which line does this program print?
Predict the output
next kata
Review generated payment boundary
Review AI code
A new version is available
Reload