Skip to content

Commit

Permalink
Removed try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
lupengamzn committed Apr 27, 2021
1 parent 1ddcf77 commit 8fc364a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 1 addition & 6 deletions aws_xray_sdk/core/emitters/udp_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ def port(self):
return self._port

def _send_data(self, data):

try:
self._socket.sendto(data.encode('utf-8'), (self._ip,
self._port))
except Exception:
raise
self._socket.sendto(data.encode('utf-8'), (self._ip, self._port))

def _parse_address(self, daemon_address):
try:
Expand Down
5 changes: 1 addition & 4 deletions aws_xray_sdk/core/models/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@ def serialize(self):
Serialize to JSON document that can be accepted by the
X-Ray backend service. It uses json to perform serialization.
"""
try:
return json.dumps(self.to_dict(), default=str)
except Exception:
raise
return json.dumps(self.to_dict(), default=str)

def to_dict(self):
"""
Expand Down

0 comments on commit 8fc364a

Please sign in to comment.