Review main Merged

55412[TASK] Specific exception in ArrayUtility::getValueByPath()

Christian Kuhn CR +2 V +2 Hard +163 −128 updated 01/19/18, 15:08

Commit message

If ArrayUtility::getValueByPath() does not find a given
path in an array structure, it currently throws a generic
\RuntimeException. Checking the path is one of the key
components of the method and consuming code may not know
if the path exists at all, which is fine.

Throwing global \RuntimeException thus forces various
places to catch \RuntimeException which possibly
hides away programming errors and mis-uses.

The patch makes getValueByPath() throw a specific exception
if path does not exists. Catching that specific exception
reduces the number of global 'catch \RuntimeException'
significantly.

The patch also adds another catch in early install tool
to fix a not recoverable fatal if LocalConfiguration
'EXTENSIONS' array does not yet exist, for instance if
upgrading from v8 to v9.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 16