Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from takkii/develop
Browse files Browse the repository at this point in the history
Update.
  • Loading branch information
takkii authored Mar 4, 2023
2 parents b2efe11 + 78ace9e commit 03877ef
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions rplugin/python3/deoplete/sources/phantom.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ def gather_candidates(self, context):
else:
raise ValueError("Please, Check the path of phantom.")

# TraceBack
except Exception:
with open("phantom_error.log", 'a') as log_py:
traceback.print_exc(file=log_py)
sys.exit()

# Custom Exception
except ValueError as ext:
print(ext)

else:
# read
data = list(ruby_method.readlines())
data_ruby = [s.rstrip() for s in data]
Expand All @@ -53,17 +64,4 @@ def gather_candidates(self, context):

# result
return complete

# TraceBack
except Exception:
with open("phantom_error.log", 'a') as log_py:
traceback.print_exc(file=log_py)
sys.exit()

# Custom Exception
except ValueError as ext:
print(ext)

# GC Start
finally:
gc.enable()

0 comments on commit 03877ef

Please sign in to comment.