当前位置: 首页>>代码示例>>Python>>正文


Python Errors.report_error方法代码示例

本文整理汇总了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
开发者ID:blackvladimir,项目名称:cython,代码行数:28,代码来源:Pipeline.py

示例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)
开发者ID:enyst,项目名称:plexnet,代码行数:12,代码来源:Main.py

示例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
开发者ID:bigmlcom,项目名称:pylibs,代码行数:15,代码来源:Main.py

示例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
开发者ID:agasheesh,项目名称:cython,代码行数:24,代码来源:Pipeline.py

示例5: nonfatal_error

# 需要导入模块: import Errors [as 别名]
# 或者: from Errors import report_error [as 别名]
 def nonfatal_error(self, exc):
     return Errors.report_error(exc)
开发者ID:jpe,项目名称:cython,代码行数:4,代码来源:Main.py


注:本文中的Errors.report_error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。