mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Write errors to stderr, closes #1131
This commit is contained in:
parent
42efb799ea
commit
eae103a82b
4 changed files with 16 additions and 6 deletions
|
|
@ -2,6 +2,7 @@ import asyncio
|
|||
import csv
|
||||
import hashlib
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import urllib
|
||||
|
||||
|
|
@ -362,7 +363,8 @@ class DataView(BaseView):
|
|||
new_row.append(cell)
|
||||
await writer.writerow(new_row)
|
||||
except Exception as e:
|
||||
print("caught this", e)
|
||||
sys.stderr.write("Caught this error: {}\n".format(e))
|
||||
sys.stderr.flush()
|
||||
await r.write(str(e))
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue