Answers.Body: <p>When extern/url.php is invoked, the CMS is not bootstrapped and extern/url.php require_once's all the code it needs to run. So if you specify a Fatal Error Handler (CiviCRM > Administer > System settings > Debugging and Error Handling) it won't be found.</p>
  
  <p>To resolve this, edit extern/url.php to add a require_once statement which names the file containing your handler. (Be careful this file doesn't execute code that will impact on extern/url.php - mine only has function definitions.)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-06T05:13:23.410Z
Answers.LastActivityDate: 2018-10-06T05:13:23.410Z
Answers.UserDisplayName: Ken West
Body: <p>I noticed my Fatal Error Handler wasn't being called when CiviCRM had problems processing trackable URLs in a CiviMail.</p>
  
  <p>My answer will tell you how to do this.</p>
  
Tags: <civimail><errorhandling>
Title: How do I call the Fatal Error Handler for extern/url.php?
ThreadText: # How do I call the Fatal Error Handler for extern/url.php?
  
  (Asked by: username_0 on 2018-10-06)
  
  I noticed my Fatal Error Handler wasn't being called when CiviCRM had problems processing trackable URLs in a CiviMail.
  
  My answer will tell you how to do this.
  
  **Tags:** civimail, errorhandling
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-10-06. Score: 1
  
  When extern/url.php is invoked, the CMS is not bootstrapped and extern/url.php require\_once's all the code it needs to run. So if you specify a Fatal Error Handler (CiviCRM > Administer > System settings > Debugging and Error Handling) it won't be found.
  
  To resolve this, edit extern/url.php to add a require\_once statement which names the file containing your handler. (Be careful this file doesn't execute code that will impact on extern/url.php - mine only has function definitions.)
  
  
  ---
  
  