title: What would cause an error to have no message in Laravel
body: <p>So this question is based more on why only part of an error is showing that the error itself (although it would be great if someone could also solve the error as well). </p>
  
  <p>However, I have a logging function in Laravel that emails an error notification as well as logs it. (Admittedly, it's probably not the best practice, although it tends to serve its purpose). My code for sending the error email is as shown below...</p>
  
  <p><strong>Exceptions\Handler.php</strong></p>
  
  <pre><code>public function report(Exception $e)
  {
      \Mail::send('emails.error', ['error' =&gt; $e], function ($m) use ($e) {
  
  
          $m-&gt;from('noreply@mydomain.com', 'MMC API | Laravel Error ');
  
          $m-&gt;to('me@mydomain.com')
          -&gt;cc('someoneelse@mydomain.com')
          -&gt;subject($e-&gt;getMessage());
      });
  
      parent::report($e);
  }
  </code></pre>
  
  <p><strong>resources\views\emails\error.blade.php</strong></p>
  
  <pre><code>&lt;p&gt;&lt;strong&gt;Message: &lt;/strong&gt;{{ $error-&gt;getMessage() }}&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;File: &lt;/strong&gt;{{ $error-&gt;getFile() }}&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Trace: &lt;/strong&gt;{{$error-&gt;getTraceAsString()}}&lt;/p&gt;
  </code></pre>
  
  <p>However, I just recieved and error without the Message from the <code>getMessage()</code> section of the email (as shown below)...</p>
  
  <pre><code>Message: 
  File: C:\api\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php
  Trace: 
      #0 C:\api\vendor\laravel\framework\src\Illuminate\Routing\Router.php(823): Illuminate\Routing\RouteCollection-&gt;match(Object(Illuminate\Http\Request)) 
      #1 C:\api\vendor\laravel\framework\src\Illuminate\Routing\Router.php(691): Illuminate\Routing\Router-&gt;findRoute(Object(Illuminate\Http\Request)) 
      #2 C:\api\vendor\laravel\framework\src\Illuminate\Routing\Router.php(675): Illuminate\Routing\Router-&gt;dispatchToRoute(Object(Illuminate\Http\Request)) 
      #3 C:\api\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(246): Illuminate\Routing\Router-&gt;dispatch(Object(Illuminate\Http\Request)) 
      #4 [internal function]: Illuminate\Foundation\Http\Kernel-&gt;Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) 
      #5 C:\api\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) 
      #6 C:\api\vendor\barryvdh\laravel-cors\src\HandleCors.php(34): Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) 
      #7 [internal function]: Barryvdh\Cors\HandleCors-&gt;handle(Object(Illuminate\Http\Request), Object(Closure)) 
      #8 C:\api\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array) 
      #9 [internal function]: Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) 
      #10 C:\api\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) 
      #11 C:\api\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(44): Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) 
      #12 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode-&gt;handle(Object(Illuminate\Http\Request), Object(Closure)) 
      #13 C:\api\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array) 
      #14 [internal function]: Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) 
      #15 C:\api\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) 
      #16 [internal function]: Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) 
      #17 C:\api\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) 
      #18 C:\api\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(132): Illuminate\Pipeline\Pipeline-&gt;then(Object(Closure)) 
      #19 C:\api\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(99): Illuminate\Foundation\Http\Kernel-&gt;sendRequestThroughRouter(Object(Illuminate\Http\Request)) 
      #20 C:\api\public\index.php(54): Illuminate\Foundation\Http\Kernel-&gt;handle(Object(Illuminate\Http\Request)) 
      #21 {main}
  </code></pre>
  
  <p>It seems like there might have possibly been something wrong with the <code>Barryvdh\Cors\HandleCors-</code> which I use to enable a cross-domain API or possibly a web crawler trying to poke around a different route than what I allow.</p>
  
  <p><strong>For my original question though:</strong> is it possible to have an error without a Message by which I could get it with <code>getMessage()</code></p>
  
  <p><strong>And bonus question:</strong> is it possible to diagnose the Route error I'm getting with the limited information I have available?</p>