Exceptions not friendly to browser console

Đang mở
#718 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, python
Lĩnh vực
compilers

Hướng nghiên cứu

Start by reproducing the Exception and assert examples with --dassert, then inspect the generated JavaScript and the resulting Firefox console output. Trace how raised exceptions and failed assertions are translated, and consider the work complete when both examples show useful messages and a stack trace in the browser console.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Thank you so much for the code, Transcrypt is becoming awesome. Now to the issue:

raise Exception("Brouhaha!!!1")
assert False, "assert works in js"  # cannot debug this in JS console

Any one of the above exceptions appear in Firefox console as:
uncaught exception: unknown (can't convert to string)
...and there is no stacktrace.

(I compile with --dassert because I want assertions to run in JS.)

This is too unfriendly and impossible to debug, I am afraid.

If I am missing something, of course, please let me know.

Ngôn ngữ chính
Python
Star
2.9k
Fork
218
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TranscryptOrg/Transcrypt

Tất cả issue của TranscryptOrg/Transcrypt

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.