Skip to content

Commit

Permalink
1.3.0 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
niksamokhvalov committed Aug 24, 2017
1 parent 10f8754 commit 06881df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Change log

## 1.3.0 - 2017-07-26
## 1.3.0 - 2017-08-24
### Changed
* Smart exception handling.
* Exception handling refactoring.
* Unsupported HHMV.

## 1.2.1 - 2017-01-28
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2015 — 2016 Notamedia Ltd. (http://nota.media)
Copyright © 2015 — 2017 Notamedia Ltd. (http://nota.media)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 1 addition & 21 deletions src/SentryTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,7 @@ public function export()
$data['extra'] = call_user_func($this->extraCallback, $text, $data['extra']);
}

if (isset($data['extra']) && $exception = $this->extractException($data['extra'])) {
$this->client->captureException($exception, $data);
} else {
$this->client->capture($data, $traces);
}
}
}

/**
* Take and remove the exception out of context of the message.
*
* @param array $extra Extra data from message.
* @return null|\Throwable|\Exception
*/
protected function extractException(array &$extra)
{
foreach ($extra as $key => $value) {
if ($value instanceof \Throwable || $value instanceof \Exception) {
unset($extra[$key]);
return $value;
}
$this->client->capture($data, $traces);
}
}

Expand Down

0 comments on commit 06881df

Please sign in to comment.