Skip to content

Commit

Permalink
Add previous for throwable
Browse files Browse the repository at this point in the history
  • Loading branch information
lozovoyv committed Feb 17, 2021
1 parent 0f37f60 commit f05d4d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function load(?string $profile = null, ?string $overrides = null, bool $f
$this->cached = $this->cache->load($this->config, $profile);

} catch (ConfigCacheException $e) {
throw new ConfigException("Configuration cache error: {$e->getMessage()}");
throw new ConfigException("Configuration cache error: {$e->getMessage()}", 0, $e);
}
}

Expand All @@ -110,7 +110,7 @@ public function load(?string $profile = null, ?string $overrides = null, bool $f
try {
$loaded = $this->repository ? $this->repository->load($this->config, $profile, $overrides) : true;
} catch (ConfigRepositoryException $e) {
throw new ConfigException("Configuration repository error: {$e->getMessage()}");
throw new ConfigException("Configuration repository error: {$e->getMessage()}", 0, $e);
}

// Conditionally make cache for config
Expand All @@ -121,7 +121,7 @@ public function load(?string $profile = null, ?string $overrides = null, bool $f
$this->cache->save($this->config, $profile, $ttl);

} catch (ConfigCacheException $e) {
throw new ConfigException("Configuration cache error: {$e->getMessage()}");
throw new ConfigException("Configuration cache error: {$e->getMessage()}", 0, $e);
}
}

Expand Down

0 comments on commit f05d4d1

Please sign in to comment.