Display filename and line of user code when Rhymix\Framework\Exception is thrown

This commit is contained in:
Kijin Sung 2025-07-22 20:55:29 +09:00
parent c213652ccd
commit d544365399
2 changed files with 24 additions and 3 deletions

View file

@ -235,7 +235,7 @@ class ModuleObject extends BaseObject
catch (Rhymix\Framework\Exception $e)
{
$this->stop($e->getMessage(), -2);
$this->add('rx_error_location', $e->getFile() . ':' . $e->getLine());
$this->add('rx_error_location', $e->getUserFileAndLine());
}
}
@ -857,8 +857,7 @@ class ModuleObject extends BaseObject
catch (Rhymix\Framework\Exception $e)
{
$output = new BaseObject(-2, $e->getMessage());
$location = $e->getFile() . ':' . $e->getLine();
$output->add('rx_error_location', $location);
$output->add('rx_error_location', $e->getUserFileAndLine());
}
// Trigger after specific action