本文整理汇总了Python中Errors.report_error方法的典型用法代码示例。如果您正苦于以下问题:Python Errors.report_error方法的具体用法?Python Errors.report_error怎么用?Python Errors.report_error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Errors
的用法示例。
在下文中一共展示了Errors.report_error方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_pipeline
# 需要导入模块: import Errors [as 别名]
# 或者: from Errors import report_error [as 别名]
def run_pipeline(pipeline, source, printtree=True):
from Cython.Compiler.Visitor import PrintTree
error = None
data = source
try:
try:
for phase in pipeline:
if phase is not None:
if DebugFlags.debug_verbose_pipeline:
t = time()
print "Entering pipeline phase %r" % phase
if not printtree and isinstance(phase, PrintTree):
continue
data = phase(data)
if DebugFlags.debug_verbose_pipeline:
print " %.3f seconds" % (time() - t)
except CompileError, err:
# err is set
Errors.report_error(err)
error = err
except InternalError, err:
# Only raise if there was not an earlier error
if Errors.num_errors == 0:
raise
error = err
示例2: run_pipeline
# 需要导入模块: import Errors [as 别名]
# 或者: from Errors import report_error [as 别名]
def run_pipeline(self, pipeline, source):
err = None
data = source
try:
for phase in pipeline:
if phase is not None:
data = phase(data)
except CompileError, err:
# err is set
Errors.report_error(err)
示例3: run_pipeline
# 需要导入模块: import Errors [as 别名]
# 或者: from Errors import report_error [as 别名]
def run_pipeline(self, pipeline, source):
error = None
data = source
try:
for phase in pipeline:
if phase is not None:
if DebugFlags.debug_verbose_pipeline:
print "Entering pipeline phase %r" % phase
data = phase(data)
except CompileError, err:
# err is set
Errors.report_error(err)
error = err
示例4: run_pipeline
# 需要导入模块: import Errors [as 别名]
# 或者: from Errors import report_error [as 别名]
def run_pipeline(pipeline, source):
error = None
data = source
try:
try:
for phase in pipeline:
if phase is not None:
if DebugFlags.debug_verbose_pipeline:
t = time()
print "Entering pipeline phase %r" % phase
data = phase(data)
if DebugFlags.debug_verbose_pipeline:
print " %.3f seconds" % (time() - t)
except CompileError, err:
# err is set
Errors.report_error(err)
error = err
except InternalError, err:
# Only raise if there was not an earlier error
if Errors.num_errors == 0:
raise
error = err
示例5: nonfatal_error
# 需要导入模块: import Errors [as 别名]
# 或者: from Errors import report_error [as 别名]
def nonfatal_error(self, exc):
return Errors.report_error(exc)