Skip to content

Commit

Permalink
Merge pull request #105 from jmsche/fix-undefined-profile-exception
Browse files Browse the repository at this point in the history
Fixed exception thrown when a profile does not exist
  • Loading branch information
sguionni authored Oct 8, 2019
2 parents 670fdc9 + 2650552 commit 0ac26fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Form/Type/FroalaEditorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ public function buildView( FormView $p_view, FormInterface $p_form, array $p_opt
}
else
{
throw new \Exception( 'Could not find profile "' . $profile . '", defined profiles: [' .
join( ',', $profiles ) . ']' );
throw new \InvalidArgumentException(sprintf(
'Unrecognized profile "%s". Available profiles are "%s".',
$profile,
implode('"", "', array_keys($profiles))
));
}

}
Expand Down

0 comments on commit 0ac26fa

Please sign in to comment.