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

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

问题描述

我正在使用编程工具(编译器或 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?

推荐答案

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

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天全站免登陆