temp review 1

This commit is contained in:
odain
2026-01-28 16:35:25 +01:00
parent 54c7af1140
commit 65065026b1
2 changed files with 5 additions and 3 deletions

View File

@@ -495,8 +495,7 @@ abstract class MetaModel
return $sModuleName;
}
} catch (\Exception $e) {
IssueLog::Error("Cannot compute class properly", null, [$e->getTraceAsString(), $e->getMessage()]);
return "";
throw new CoreException("Cannot find class module", ['class' => $sClass], '', $e);
}
return 'core';

View File

@@ -501,7 +501,10 @@ class MetaModelTest extends ItopDataTestCase
public function testGetCreatedIn_UnknownClass()
{
$this->assertEquals('', MetaModel::GetModuleName('GABUZOMEU'));
$this->expectExceptionMessage("Cannot find class module");
$this->expectException(CoreException::class);
MetaModel::GetModuleName('GABUZOMEU');
}
public function testGetCreatedIn_ClassComingFromCorePhpFile()