throw new error() in beforeSave

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scott_Smith
    Junior Member
    • Oct 2017
    • 27

    throw new error() in beforeSave

    Maybe I'm missing something here but is there any reason why I cannot throw an error in the beforeSave hook???

    thanks in advance!
    Scott
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    default exception works good (throw new \Exception("Test error", 400)
    also you can use one of \Espo\Core\Exceptions\

    Comment

    • Scott_Smith
      Junior Member
      • Oct 2017
      • 27

      #3
      Many thanks for your prompt reply!
      best regards
      Scott

      Comment

      Working...