什么是“内部错误"?以及如何解决? [英] What is an "internal error" and how do I fix it?

查看:1316
本文介绍了什么是“内部错误"?以及如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用编程工具(编译器或IDE或其他工具),当我使用它时,它报告内部错误",并带有一些无法理解的细节.我要修复此错误.我该怎么办?

I am using a programming tool (a compiler or IDE or other tool) and it reports an "internal error" with some incomprehensible details when I use it. I want to fix this error. What should I do?

推荐答案

编程工具必须报告程序中的错误,例如代码中的语法错误,运行时的运行时错误以及测试时的失败,因此您可以修复您的代码.但是该编程工具是本身计算机程序,因此 itself 可能存在错误.对复杂程序的谨慎程序员包括自我检查,以检测未知错误的后果.如果这些自检之一失败,则程序员将安排程序报告有关自检失败的信息.为防止您的代码中的错误与工具本身的错误混淆,通常将工具本身的错误称为内部错误.

The programming tool has to report errors in your program, such as syntax errors in your code, runtime errors when you run it, and test failures when you test it, so you can fix your code. But that programming tool is itself a computer program, and so itself can have bugs in it. Careful programmers of complicated programs include self-checks to detect the consequences of unknown bugs. If one of those self-checks fails, the programmer will have arranged for the program to report information about the failed self-check. To prevent confusion between errors in your code and errors in the tool itself it is conventional to call the error in the tool itself an internal error.

在许多编程语言中,使用,并且有关故障的信息以.

In many programming languages, self-checks are done using assertions, and information about the failure is provided in the form of a stack-trace.

那么,如何解决内部错误? 您不能.该错误不在您的代码中.只有编程工具的开发人员才能修复它.但这并不意味着您无能为力.

So, how do you fix an internal error? You can't. The error is not in your code. Only the developer of the programming tool can fix it. But that does not mean there is nothing you can do.

  • 如果使用的是旧版本的编程工具,则可能是较新版本的工具已解决该问题.因此,请考虑更新或升级您的编程工具.

  • If you are using an old version of the programming tool, it is possible that a newer version of the tool has fixed the problem. Therefore consider updating or upgrading your programming tool.

如果您的代码使用的是异常或新的编程结构,则可能是该工具出现问题,因为该结构是新的或异常的,因此没有相关的信息经常使用可发现并消除的错误.因此,考虑重写代码,不要在似乎已触发内部错误的代码部分中使用任何异常或新的编程构造.

If your code is making use of unusual or new programming constructs, it may be that the tool has the problem because the constructs are new or unusual, and so have not had the related bugs detected and eliminated by frequent use. Therefore consider rewriting your code not to use any unusual or new programming constructs in the section of your code that seems to have triggered the internal error.

如果您正在使用最新版本的编程工具,请考虑向该工具的开发者提交错误报告.

If you are using an up to date version of the programming tool, consider submitting a bug report to the developers of the tool.

这篇关于什么是“内部错误"?以及如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆