Centrotherm 常见错误消除

合集下载

Fortran运行中给出的系统错误及解决方法

Fortran运行中给出的系统错误及解决方法

⎰-102e xdxSevere_MessagesMust be corrected. The program's execution is terminated when the error is encountered, unless for I/O statements the program uses the END or ERR I/O statement specifiers to transfer control,perhaps to a routine that uses the IOSTAT specifier (see your DEC Fortran user manual).The severe messages follow (in alphabetical order):o MESSAGE: Adjustable array dimension errorNUMBER: 93EXPLANATION: Upon entry to a subprogram, one of the followingerrors was detected during the evaluation of dimensioninginformation:- An upper-dimension bound was less than alower-dimension bound.- The dimensions implied an array that was largerthan addressable memory.o MESSAGE: Attempt to access non-existent recordNUMBER: 36EXPLANATION: A direct-access READ or FIND statement attemptedto access beyond the end of a relative file (or a sequentialfile on disk with fixed-length records) or access a record that was previously deleted in a relative file.o Array index out of bounds (SIGTRAP)NUMBER: 138EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.The cause is an array subscript that is outside the dimensionedboundaries of that array. Try recompiling using the -checkbounds option (perhaps with the f77_dump_flag environmentvariable set) or examine the core dump file to determine thesource code in error.o MESSAGE: Array index out of bounds for index n (SIGTRAP) NUMBER: 139EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.The cause is an array subscript that is outside the dimensionedboundaries of the array index n. Try recompiling using the-check bounds option (perhaps with the f77_dump_flagenvironment variable set) or examine the core dump file todetermine the source code in error.o MESSAGE: BACKSPACE errorNUMBER: 23EXPLANATION: An error condition was detected during executionof a BACKSPACE statement.o MESSAGE: Cannot overwrite existing fileNUMBER: 10EXPLANATION: Specified file xxx already exists when OPENstatement specified STATUS='NEW' (create new file) using I/Ounit x. Make sure correct file name, directory path, unit, and so forth were specified in the source program. Decide whether to:- Rename or remove the existing file before rerunningthe program.- Modify the source file to specify different filespecification, I/O unit, or OPEN statement STATUS='UNKNOWN'. o MESSAGE: Cannot stat fileNUMBER: 108EXPLANATION: Attempted stat operation on the indicated filefailed. Make sure correct file and unit were specified.o MESSAGE: CLOSE errorNUMBER: 28EXPLANATION: An error condition was detected by the DECFortran RTL I/O system during execution of a CLOSE statement. o MESSAGE: DELETE errorNUMBER: 55EXPLANATION: An error condition was detected by the DECFortran RTL I/O system during execution of a DELETE statement. o MESSAGE: Divide by zero check (SIGTRAP)NUMBER: 137EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump file for possible cause.o MESSAGE: Duplicate file specificationsNUMBER: 21EXPLANATION: Multiple attempts were made to specify fileattributes without an intervening close operation. A DEFINEFILE statement was followed by another DEFINE FILE statement or an OPEN statement.o MESSAGE: ENDFILE errorNUMBER: 33EXPLANATION: One of the following conditions occurred:- The file was not a sequential organization file withvariable-length records.- The file was not opened for sequential or append access.- An unformatted file did not contain segmented records.- The DEC Fortran RTL I/O system detected an error duringexecution of an ENDFILE statement.o MESSAGE: End-of-file during readNUMBER: 24EXPLANATION: One of the following conditions occurred:- A DEC Fortran RTL I/O system end-of-file conditionwas encountered during execution of a READ statementthat did not contain an END, ERR, or IOSTAT specification. - An end-of-file record written by the ENDFILE statementwas encountered during execution of a READ statementthat did not contain an END, ERR, or IOSTAT specification. - An attempt was made to read past the end of an internalfile character string or array during execution of a READ statement that did not contain an END, ERR, or IOSTATspecification.o MESSAGE: Error during readNUMBER: 39EXPLANATION: The DEC Fortran RTL I/O system detected an errorcondition during execution of a READ statement.o MESSAGE: Error during writeNUMBER: 38EXPLANATION: The DEC Fortran RTL I/O system detected an error condition during execution of a WRITE statement.o MESSAGE: File name specification errorNUMBER: 43EXPLANATION: The file name was specified erroneously.o MESSAGE: File not foundNUMBER: 29EXPLANATION: A file with the specified name could not be found during an open operation.o MESSAGE: FIND errorNUMBER: 57EXPLANATION: The DEC Fortran RTL I/O system detected an error condition during execution of a FIND statement.o MESSAGE: Floating overflow in math libraryNUMBER: 88EXPLANATION: A floating-point overflow condition was detected during execution of a math library procedure.o MESSAGE: Floating underflow in math libraryNUMBER: 89EXPLANATION: A floating-point underflow condition was detected during execution of a math library procedure. The resultreturned was zero.o MESSAGE: Format/variable-type mismatchNUMBER: 61EXPLANATION: An attempt was made either to read or write areal variable with an integer field descriptor (I or L), or to read or write an integer or logical variable with a real field descriptor (D, E, F, or G).o MESSAGE: Formatted I/O to unit open for unformatted transfers NUMBER: 257EXPLANATION: Attempted formatted I/O (such as list-directed ornamelist I/O) to a unit where the OPEN statement indicated the file was unformatted (FORM keyword). Check that the correct unit (file) was specified.If the FORM keyword was not specified in the OPEN statement andthe file should contain formatted data, specifyFORM='FORMATTED' in the OPEN statement. Otherwise, ifappropriate, use unformatted I/O.o MESSAGE: Inconsistent file organizationNUMBER: 51EXPLANATION: The file organization specified in an OPENstatement did not match the organization of the existing file. o MESSAGE: Inconsistent OPEN/CLOSE parametersNUMBER: 46EXPLANATION: Specifications in an OPEN or CLOSE statement wereinconsistent. Some invalid combinations follow:- READONLY with STATUS='NEW' or STATUS='SCRATCH'- ACCESS='APPEND' with READONLY, STATUS='NEW' orSTATUS='SCRATCH'- DISPOSE='SAVE', 'PRINT', or 'SUBMIT' withSTATUS='SCRATCH'- DISPOSE='DELETE' with READONLYo MESSAGE: Inconsistent record lengthNUMBER: 37EXPLANATION: An attempt was made to open a direct access filewithout specifying a record length.o MESSAGE: Inconsistent record typeEXPLANATION: The RECORDTYPE value in an OPEN statement did notmatch the record type attribute of the existing file that was opened.o MESSAGE: Infinite format loopNUMBER: 60EXPLANATION: The format associated with an I/O statement thatincluded an I/O list had no field descriptors to use intransferring those values.o MESSAGE: Input conversion errorNUMBER: 64EXPLANATION: During a formatted input operation, an invalidcharacter was detected in an input field, or the input valueoverflowed the range representable in the input variable. The value of the variable was set to zero.o MESSAGE: Input record too longNUMBER: 22EXPLANATION: A record was read that exceeded the explicit ordefault record length specified when the file was opened. To read the file, use an OPEN statement with a RECL= value (record length) of the appropriate size.o MESSAGE: Input statement requires too much dataEXPLANATION: An unformatted READ statement attempted to readmore data than existed in the record being read.o MESSAGE: Insufficient virtual memoryNUMBER: 41EXPLANATION: The DEC Fortran RTL was unable to acquireadditional virtual memory from the operating system. Users of the C and Korn shells may be able to overcome this problem by increasing the per-process data limit using the limit (C shell) or ulimit (Korn shell) commands. For more information, see the csh(1) and ksh(1) reference pages.If the maximum per-process data size is already allocated,increase the value of the maxdsiz parameter in the system'sconfiguration file. Note that edits to the configuration file do not take effect until the operating system kernel has been rebuilt, and the system has been rebooted. For moreinformation, see the doconfig(1) reference page and youroperating system guide to system configuration.o MESSAGE: Integer overflowNUMBER: 70EXPLANATION: During an arithmetic operation, an integer valueexceeded byte, word, or longword range. The result of theoperation was the correct low-order part. See your DEC Fortran user manual for ranges of the various integer data types.o MESSAGE: Integer zero divideNUMBER: 71EXPLANATION: During an integer arithmetic operation, anattempt was made to divide by zero. The result of theoperation was set to the dividend, which is equivalent todivision by 1.o MESSAGE: Internal consistency check failureNUMBER: 8EXPLANATION: Internal severe error. Please check that theprogram is correct. Recompile if an error exists in theprogram.If this error persists, submit an SPR.o MESSAGE: Invalid argument to Fortran Run-Time Library NUMBER: 48EXPLANATION: The compiler passed an invalid or improperlycoded argument to the DEC Fortran RTL. This can occur if the compiler is newer than the RTL in use.o MESSAGE: Invalid argument to math libraryNUMBER: 81EXPLANATION: One of the mathematical procedures detected aninvalid argument value.o MESSAGE: Invalid logical unit numberNUMBER: 32EXPLANATION: A logical unit number greater than or less than zero was used in an I/O statement.o MESSAGE: Invalid reference to variable in NAMELIST input NUMBER: 19EXPLANATION: One of the following conditions occurred:- The variable was not a member of the namelist group.- An attempt was made to subscript the scalar variable.- A subscript of the array variable was out-of-bounds.- An array variable was specified with too many or toofew subscripts for the variable.- An attempt was made to specify a substring of a non-character variable or array name.- A substring specifier of the character variable wasout-of-bounds.- A subscript or substring specifier of the variable wasnot an integer constant.- An attempt was made to specify a substring using anunsubscripted array variable.o MESSAGE: Kernel breakpoint (SIGTRAP)NUMBER: 131EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump for possible cause.o MESSAGE: Keyword value error in OPEN statementNUMBER: 45EXPLANATION: An improper value was specified for an OPEN orCLOSE statement keyword requiring a value.o MESSAGE: List-directed I/O syntax errorNUMBER: 59EXPLANATION: The data in a list-directed input record had aninvalid format, or the type of the constant was incompatiblewith the corresponding variable. The value of the variable was unchanged.o MESSAGE: Logarithm of zero or negative valueNUMBER: 83EXPLANATION: An attempt was made to take the logarithm of zeroor a negative number. The result returned was the reservedoperand, -0.o MESSAGE: Mixed file access modesNUMBER: 31EXPLANATION: An attempt was made to use any of the followingcombinations:- Formatted and unformatted operations on the same unit.- An invalid combination of access modes on a unit,such as direct and sequential.- A DEC Fortran RTL I/O statement on a logical unit thatwas opened by a program coded in another language. o MESSAGE: No such deviceNUMBER: 42EXPLANATION: A pathname included an invalid or unknown device name when an OPEN operation was attempted.o MESSAGE: Not a Fortran-specific errorNUMBER: 1EXPLANATION: An error occurred in the user program or in the RTL that was not a DEC Fortran-specific error.o MESSAGE: Not taken branch delay emulation (SIGTRAP) NUMBER: 134EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created. Examine core dump for possible cause.o MESSAGE: OPEN or DEFINE FILE requiredNUMBER: 26EXPLANATION: A direct access READ, WRITE, or FIND, statementwas attempted for a file when no DEFINE FILE or OPEN statement with ACCESS='DIRECT' was performed for that file.o MESSAGE: Open failureNUMBER: 30EXPLANATION: An error was detected by the DEC Fortran RTL I/Osystem while attempting to open a file in an OPEN, INQUIRE, or other I/O statement. This message is issued when the errorcondition is not one of the more common conditions for which specific error messages are provided. It can occur if an OPEN operation is attempted for one of the following files:- A segmented file that was not on a disk or a rawmagnetic tape.- A standard I/O file that had been closed.o MESSAGE: Operation requires seek abilityNUMBER: 120EXPLANATION: Attempted an operation on a file that requiresthe ability to perform seeks on that file. Make sure thecorrect unit, directory path, and file were specified.o MESSAGE: Output statement overflows recordNUMBER: 66EXPLANATION: An output statement attempted to transfer moredata than would fit in the maximum record size.o MESSAGE: Overflow check (SIGTRAP)NUMBER: 136EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.The cause is an integer overflow. Try recompiling using the-check overflow option (perhaps with the f77_dump_flagenvironment variable set) or examine the core dump file todetermine the source code in error.o MESSAGE: Pathname errorNUMBER: 43EXPLANATION: A pathname (or file name) given to an OPEN orINQUIRE statement was not acceptable to the DEC Fortran RTL I/O system.o MESSAGE: Permission to access file denied, unit x, file xxx NUMBER: 9EXPLANATION: Check the mode (protection) of the specifiedfile. Make sure the correct file was being accessed. Change the protection, specified file, or process used beforererunning program.o MESSAGE: Record number outside rangeNUMBER: 25EXPLANATION: A direct access READ, WRITE, or FIND statementspecified a record number outside the range specified when the file was opened.o MESSAGE: Recursive I/O operationNUMBER: 40EXPLANATION: While processing an I/O statement for a logicalunit, another I/O operation on the same logical unit wasattempted, such as a function subprogram that performs I/O to the same logical unit was referenced in an expression in an I/O list or variable format expression.o MESSAGE: REWIND errorNUMBER: 20EXPLANATION: One of the following conditions occurred:- The file was not a sequential file.- The file was not opened for sequential or append access.- The DEC Fortran RTL I/O system detected an error conditionduring execution of a REWIND statement.o MESSAGE: Segmented record format errorNUMBER: 35EXPLANATION: An invalid segmented record control data word wasdetected in an unformatted sequential file. The file wasprobably either created with RECORDTYPE='FIXED' or 'VARIABLE' in effect, or was created by a program written in a languageother than Fortran.o MESSAGE: Significance lost in math libraryNUMBER: 87EXPLANATION: The magnitude of an argument or the magnitude ofthe ratio of the arguments to a math library function was solarge that all significance in the result was lost. The result returned was the reserved operand, -0.o MESSAGE: Square root of negative valueNUMBER: 84EXPLANATION: An argument required the evaluation of the squareroot of a negative value. The result returned was the reserved operand, -0.o MESSAGE: Subscript out of rangeNUMBER: 77EXPLANATION: An array reference was detected outside thedeclared array bounds.o MESSAGE: Syntax error in formatNUMBER: 62EXPLANATION: A syntax error was encountered while the RTL wasprocessing a format stored in an array or character variable. o MESSAGE: Syntax error in NAMELIST inputNUMBER: 17EXPLANATION: The syntax of input to a namelist READ statement was incorrect.o MESSAGE: Taken branch delay emulation (SIGTRAP) NUMBER: 133EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created. Examine core dump for possible cause.o MESSAGE: Too many records in I/O statementNUMBER: 27EXPLANATION: An attempt was made to do one of the following: - Read or write more than one record with an ENCODEor DECODE statement.- Write more records than existed.o MESSAGE: Too many values for NAMELIST variableNUMBER: 18EXPLANATION: An attempt was made to assign too many values to a variable during a namelist READ statement.o MESSAGE: Undefined exponentiationNUMBER: 82EXPLANATION: An exponentiation that is mathematicallyundefined was attempted, for example, 0.**0. The result returned for floating-point operations was the reservedoperand, -0, and for integer operations, zero.o MESSAGE: Unformatted I/O to unit open for formatted transfers NUMBER: 256EXPLANATION: Attempted unformatted I/O to a unit where theOPEN statement indicated the file was formatted (FORM keyword). Check that the correct unit (file) was specified.If the FORM keyword was not specified in the OPEN statement andthe file should contain unformatted data, specifyFORM='UNFORMATTED' in the OPEN statement. Otherwise, ifappropriate, use formatted I/O (such as list-directed ornamelist I/O).o MESSAGE: Unit already openNUMBER: 34EXPLANATION: A DEFINE FILE statement specified a logical unitthat was already opened.o MESSAGE: Unit not connectedNUMBER: 11EXPLANATION: The specified unit was not open at the time ofthe attempted I/O operation. Check if correct unit number was specified. If appropriate, use an OPEN statement to explicitly open the file (associates the file with the unit number).o MESSAGE: User breakpoint (SIGTRAP)EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump for possible cause.o MESSAGE: User single step (SIGTRAP)NUMBER: 135EXPLANATION: Break exception generated a SIGTRAP signal(described in signal(3)). Core dump file created.Examine core dump for possible cause.o MESSAGE: Variable format expression value errorNUMBER: 68EXPLANATION: The value of a variable format expression was notwithin the range acceptable for its intended use; for example, a field width was less than or equal to zero. A value of 1 was assumed, except for a P edit descriptor, for which a value of zero was assumed.o MESSAGE: Write to READONLY fileNUMBER: 47EXPLANATION: A write operation was attempted to a file thatwas declared READONLY in the OPEN statement that is currently in effect.o MESSAGE: Wrong number of argumentsEXPLANATION: An improper number of arguments was used to calla math library procedure.Error_MessagesShould be corrected. The program may continue execution, but the output from this execution may be incorrect.The error messages follow (in alphabetical order):o MESSAGE: Floating divide by zeroNUMBER: 73EXPLANATION: During a floating-point arithmetic operation, anattempt was made to divide by zero.o MESSAGE: Floating invalidNUMBER: 65EXPLANATION: During an arithmetic operation, thefloating-point value generated resulted in an invalid format (not representable for that data type).o MESSAGE: Floating overflowNUMBER: 72EXPLANATION: During an arithmetic operation, a floating-pointvalue exceeded the largest representable value for that data type. See your DEC Fortran user manual for ranges of thevarious data types.o MESSAGE: Floating point exceptionNUMBER: 75EXPLANATION: A floating-point exception occurred. Core dumpfile created. Possible causes include divide by zero,overflow, or an invalid operation, such as subtraction ofinfinite values, multiplication of zero by infinity (withoutsigns), division of zero by zero or infinity by infinity, and conversion of floating-point to fixed-point format when anoverflow prevents conversion.o MESSAGE: Floating underflowNUMBER: 74EXPLANATION: During an arithmetic operation, a floating-pointvalue became less than the smallest representable value forthat data type. On RISC systems (depending on the values ofthe f77 command -fpe option), the underflowed result was either set to zero or allowed to gradually underflow. On AXP systems, the underflowed result is set to zero. See your DEC Fortranuser manual for ranges of the various data types.o MESSAGE: Fortran abort routine calledNUMBER: 266EXPLANATION: The program called abort to terminate theprogram.o MESSAGE: IOT trap signalNUMBER: 76EXPLANATION: Core dump file created. Examine core dump forpossible cause of this IOT signal.o MESSAGE: Output conversion errorNUMBER: 63EXPLANATION: During a formatted output operation, the value ofa particular number could not be output in the specified field length without loss of significant digits. When this situation is encountered, the field is filled with asterisks.o MESSAGE: Process interrupted (SIGINT)NUMBER: 69EXPLANATION: The process received the signal SIGINT.Determine source of this interrupt signal (described insignal(3)).o MESSAGE: Process killed (SIGTERM)NUMBER: 78EXPLANATION: The process received the signal SIGTERM.Determine source of this software termination signal (described in signal(3)).o MESSAGE: Process quit (SIGQUIT)NUMBER: 79EXPLANATION: The process received the signal SIGQUIT. Coredump file created. Determine source of this quit signal(described in signal(3)).Warning_MessagesShould be investigated. The program continues execution, but the output from this execution may be incorrect.The warning messages follow (in alphabetical order):o MESSAGE: Could not open message catalog: formsg.cat NUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. See your DEC Fortran user manual for moreinformation.Informational_MessagesFor informational purposes only. Unless it accompanies anothermessage, the program continues.The informational messages follow (in alphabetical order):o MESSAGE: Check environment variable NLSPATH and protection of path-name/for_msg.datNUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. For more information, see your DEC Fortran user manual or your DEC Fortran installation guide.o MESSAGE: Check location/protection of NLS and/usr/lib/formsg.datNUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. See your DEC Fortran user manual for moreinformation.o MESSAGE: nn floating divide-by-zero trapsNUMBER: 299EXPLANATION: The total number of floating-point divide-by-zero traps encountered during program execution was nn. This summary message appears at program completion.o MESSAGE: nn floating invalid trapsNUMBER: 297EXPLANATION: The total number of floating-point invalid data traps encountered during program execution was nn. This summary message appears at program completion.o MESSAGE: nn floating overflow trapsNUMBER: 298EXPLANATION: The total number of floating-point overflow traps encountered during program execution was nn. This summary message appears at program completion.o MESSAGE: Floating-point conversion failedNUMBER: 95EXPLANATION: The attempted unformatted read or write ofnon-native floating-point data failed. A non-nativefloating-point value either exceeded the allowable maximumvalue for the equivalent native format and was set equal toinvalid, or the value was infinity (plus or minus), not anumber (NaN), or otherwise invalid and was set to invalid.Very small numbers are set to zero (0). This could be caused by the specified non-native floating-point format not matching the floating-point format found in the specified file.Make sure the correct file was specified. Make sure the recordlayout matches the format DEC Fortran is expecting. Check that the correct non-native floating-point data format wasspecified, as described in your DEC Fortran user manual.o MESSAGE: nn floating underflow trapsNUMBER: 300EXPLANATION: The total number of floating-point underflowtraps encountered during program execution was nn. Thissummary message appears at program completion.o MESSAGE: Format syntax error at or near xxNUMBER: 58EXPLANATION: Check the statement containing xx, a charactersubstring from the format string, for a format syntax error.For information about FORMAT statements, refer to the "DECFortran Language Reference Manual".o MESSAGE: Fortran error message number is nnnNUMBER: noneEXPLANATION: The DEC Fortran message file was not found onthis system. For information about the message file location and the error text that corresponds to the listed error number, nnn, see your DEC Fortran user manual.。

VBA中的错误排查和解决方法

VBA中的错误排查和解决方法

VBA中的错误排查和解决方法VBA(Visual Basic for Applications)是一种广泛应用于微软Office软件中的编程语言,常用于自动化处理任务、开发宏和创建自定义函数等。

然而,编写VBA代码时难免会遇到错误。

当代码出现错误时,我们需要进行错误排查和解决,以确保程序的正常运行。

本文将介绍VBA中常见的错误类型,并提供一些排查和解决错误的方法。

1. 语法错误语法错误在VBA代码中是最常见的错误类型。

它们通常是由于拼写错误、遗漏符号或使用了错误的语法结构引起的。

解决语法错误的方法是仔细检查代码,并确保所有语法符号和关键字的正确使用。

如果代码较长或复杂,可以使用VBA的内置工具“编译”来自动检测语法错误。

2. 运行时错误运行时错误是在VBA代码运行期间发生的错误。

它们可能是由于无效的计算、类型不匹配、访问无效的对象或数组越界等原因引起的。

解决运行时错误的方法是使用错误处理机制来捕获和处理错误。

可以使用“On Error”语句来设置错误处理程序,并在发生错误时执行特定的操作,如显示错误消息、记录日志或进行其他处理。

3. 逻辑错误逻辑错误是指程序在逻辑上存在问题,导致程序的行为与预期不符。

这些错误通常是由于程序员在编写代码时对逻辑判断或条件错误造成的。

解决逻辑错误的方法是仔细检查代码中的逻辑流程,并使用调试工具来跟踪程序的执行过程。

可以使用断点来中断程序的执行,并逐步检查每一步的结果,以找出错误的原因。

4. 数据类型错误数据类型错误是由于使用了错误的数据类型或将不兼容的数据类型进行操作而引起的。

VBA是一种强类型语言,要求变量的数据类型必须与操作相匹配。

解决数据类型错误的方法是使用正确的数据类型声明变量,并使用类型转换函数来进行数据类型的转换。

例如,使用CInt函数将字符串转换为整数,使用CDbl函数将字符串转换为双精度浮点数等。

5. 对象错误VBA允许使用对象来访问和操作Office应用程序中的功能和对象模型。

VBA错误处理与调试技巧

VBA错误处理与调试技巧

VBA错误处理与调试技巧VBA(Visual Basic for Applications)是一种在Microsoft Office应用程序中使用的编程语言。

它提供了很多功能强大的特性,可以帮助用户自动化任务、增强应用程序的功能。

然而,编写VBA代码时常常会遇到各种错误,这就需要我们学会如何正确地处理和调试这些错误。

本文将介绍一些常用的VBA错误处理和调试技巧,以帮助读者更好地理解和应对VBA代码中的错误。

一、错误处理基础1.1 引发错误VBA代码中的一个子程序可以通过使用"Err.Raise"语句来引发一个错误。

这可以是一个自定义的错误,也可以是一个系统定义的错误。

语法如下:Err.Raise Number, [Source], [Description], [HelpFile], [HelpContext]其中,Number是错误代码,Source是错误的源头(一般为函数或过程的名称),Description是错误的描述信息,HelpFile和HelpContext是提供帮助信息的文件和上下文。

1.2 处理错误VBA提供了一种处理错误的机制,即使用"On Error"语句。

使用"On Error"语句可以将错误处理的控制权交给指定的错误处理程序。

语法如下:On Error GoTo ErrorHandler在这之后的代码中,如果发生错误,程序将会跳转到名为ErrorHandler的标签处进行错误处理。

1.3 清除错误清除错误是指将错误状态重设为0,从而结束错误处理过程。

我们可以使用"On Error Resume Next"语句来清除错误。

当程序执行到这一语句时,如果发生错误,程序将会跳过该错误,并继续执行后续代码。

二、常见的VBA错误处理技巧2.1 错误处理程序为了更好地处理VBA代码中的错误,我们可以创建一个专门的错误处理程序。

VBA 中的错误处理方法

VBA 中的错误处理方法

VBA 中的错误处理方法VBA(Visual Basic for Applications)是一种编程语言,适用于Microsoft Office 软件中的自定义宏编程。

当我们在编写 VBA 代码时,难免会遇到各种错误。

为了避免程序的崩溃和代码的中断,我们需要在代码中实现错误处理机制。

本文将介绍 VBA 中常见的错误处理方法,帮助你优化代码,并更好地进行程序开发。

1. On Error 语句On Error 语句是 VBA 中最常见和常用的错误处理方法。

它通过设置一个错误处理程序,来捕获和处理代码中的错误。

On Error 语句有两种格式可供选择:- On Error Resume Next:当发生错误时,程序将继续执行下一行代码,而不中断程序的执行。

这种方法适用于某些情况下需要忽略错误并继续运行的场景,但需要注意错误未被修复的可能性。

- On Error GoTo label:当发生错误时,程序将跳转到指定的标签处,并执行该标签下的代码。

可以在代码中定义多个标签,以应对不同的错误类型,并进行相应的处理。

例如,可以在标签处记录错误信息、弹出错误提示框、还原初始状态等。

2. Err 对象在错误处理程序中,可以使用 Err 对象获取有关错误的详细信息。

Err 对象包含以下常用的属性:- Number:返回错误代码的数字表示。

- Description:返回错误的说明文本。

- Source:返回产生错误的对象的名称。

- HelpContext:返回一个指示与错误相关的帮助文件和上下文 ID 的整型数值。

我们可以通过这些属性获取有关错误的信息,进一步进行针对性的处理和调试。

比如,可以将错误信息写入日志文件,或将错误信息显示在程序界面上,以向用户提供友好的错误提示。

3. Try...Catch...语句虽然 VBA 中没有内置的 Try...Catch...语句,但我们可以使用类似的技巧来模拟这种结构。

通过结合 On Error 语句和自定义的错误处理函数,可以实现类似于 Try...Catch...的功能。

cognos dpr-err-2002

cognos dpr-err-2002

cognos dpr-err-2002Cognos DPR-ERR-2002错误解析在Cognos BI系统中,DPR-ERR-2002是一种常见的错误代码。

当用户在使用Cognos时遇到这个错误代码,意味着系统在处理报表时发生了问题。

本文将对这个错误代码进行解析,帮助用户更好地理解问题所在并提供相应的解决方法。

让我们来了解一下DPR-ERR-2002的具体含义。

DPR代表Dispatching Process Region,是Cognos BI系统中的一个重要组件,负责处理用户请求以及分发报表数据。

而ERR-2002则表示在该过程中出现了一个错误。

出现DPR-ERR-2002错误的原因可能有很多,下面将介绍几种常见的情况及相应的解决方法。

1. 服务器连接问题DPR-ERR-2002错误有时可能是由于与Cognos服务器的连接问题引起的。

这可能是由于网络故障、服务器故障或服务器过载等原因导致的。

解决这个问题的方法是检查网络连接是否正常,确保服务器正常运行,并在需要时联系系统管理员。

2. 数据库连接问题另一个可能导致DPR-ERR-2002错误的原因是与数据库的连接问题。

Cognos系统需要与数据库进行交互以获取报表数据,如果数据库连接出现问题,就会导致报表无法正常生成。

解决这个问题的方法是检查数据库连接是否正常,确保数据库服务器正常运行,并确保数据库凭据正确。

3. 报表设计问题有时,DPR-ERR-2002错误可能是由于报表设计问题引起的。

这包括报表中的错误公式、错误的数据源配置或错误的数据模型等。

解决这个问题的方法是检查报表设计,确保公式正确、数据源配置正确,并确保数据模型与报表需求匹配。

4. 系统配置问题DPR-ERR-2002错误可能是由于Cognos系统的配置问题引起的。

这可能涉及到配置文件的错误设置、系统参数的错误配置或系统组件的错误安装等。

解决这个问题的方法是检查系统配置,确保配置文件正确、系统参数正确配置,并重新安装系统组件(如果有必要)。

内存错误代码解决方法

内存错误代码解决方法

内存错误代码解决方法内存错误是在计算机编程中经常遇到的问题之一,它会导致程序崩溃、数据丢失甚至系统崩溃。

解决内存错误代码是一个繁琐而重要的任务,本文将为您介绍内存错误的几种常见类型以及解决方法。

一、空指针错误(Null Pointer Error)空指针错误是程序中最常见的内存错误之一,它通常发生在程序试图对一个没有被初始化或释放的指针进行操作时。

出现空指针错误会导致程序崩溃或不可预测的行为。

解决空指针错误的方法包括:1. 初始化指针:在使用指针之前,确保为其分配内存并进行初始化操作,避免指针为空的情况。

2. 检查空指针:在访问指针指向的内存之前,先判断指针是否为空,以避免程序异常。

二、内存泄漏(Memory Leak)内存泄漏是指在程序运行过程中,分配的内存没有被正确释放而造成的内存浪费。

长时间运行的程序中存在内存泄漏,会逐渐消耗系统资源,导致系统性能下降。

解决内存泄漏的方法包括:1. 释放内存:在程序不再使用某些变量或数据结构时,及时释放对应的内存空间,避免长时间占用内存不释放。

2. 使用自动内存管理:如使用编程语言中提供的垃圾回收机制,自动跟踪和释放不再使用的内存,避免手动管理内存出错。

三、越界访问(Out-of-Bounds Access)越界访问是指程序试图读取或写入超出数组或缓冲区边界的内存位置。

这种错误可能导致程序运行异常,数据损坏或系统崩溃。

解决越界访问的方法包括:1. 检查索引值:在访问数组或缓冲区时,始终确保索引值在合法范围内,避免越界访问。

2. 使用函数库:使用安全的函数库,如strncpy()代替strcpy(),会在拷贝字符串时检查边界,避免越界访问造成的错误。

四、重复释放(Double Free)重复释放错误是指程序对同一个内存块进行多次释放,这会导致内存空间被重复释放,并可能导致程序运行异常或崩溃。

解决重复释放的方法包括:1. 确保释放一次:在代码中对内存块进行释放时,确保只调用一次释放函数,避免重复释放。

bcgcontrolbar mfc 重复定义 -回复

bcgcontrolbar mfc 重复定义-回复问题:[bcgcontrolbar mfc 重复定义]bcgcontrolbar是一款常用的MFC (Microsoft Foundation Classes) 控件库,它提供了丰富的UI控件和功能,使得开发者可以更方便地构建专业的Windows应用程序。

然而,有时在使用bcgcontrolbar时,可能会遇到“重复定义”问题,即编译器报告同一符号多次定义的错误。

本文将一步一步回答有关此问题的解决方案。

第一步:了解“重复定义”错误的原因在编程过程中,当编译器在编译过程中的不同文件中遇到同一标识符(变量、函数、类等)的多个定义时,就会发生“重复定义”错误。

这可能是由于以下原因导致的:1. 头文件(.h文件)中的声明被包含到多个源文件(.cpp文件)中,从而导致同一标识符的多次定义。

2. 多个源文件中包含了同一第三方库或控件的头文件,而这些头文件中定义了相同的标识符。

第二步:检查头文件及其包含关系bcgcontrolbar库通常会提供多个头文件,用于不同的控件和功能。

在使用bcgcontrolbar时,需要确保只在一个源文件中包含了bcgcontrolbar 的头文件,否则会导致重复定义的错误。

因此,建议按以下步骤检查头文件及其包含关系:1. 仔细检查项目中包含的所有源文件,确保只在一个源文件中包含了bcgcontrolbar库的头文件。

2. 检查包含bcgcontrolbar头文件的源文件,确保没有其他地方再次包含了相同的头文件。

第三步:使用预编译头文件预编译头文件(PCH)是一种加速编译过程的技术,可以在编译之前预先编译并缓存一些常用的头文件。

通过使用PCH,可以减少编译时间和资源消耗。

在解决“重复定义”问题时,使用PCH也是一个常见的解决方案。

下面是使用PCH的一般步骤:1. 将包含bcgcontrolbar头文件的源文件添加到PCH配置中。

2. 在需要使用bcgcontrolbar库的源文件中,包含PCH文件而不是直接包含bcgcontrolbar头文件。

[转载]cognos

[转载]cognos 报错解决⽅法
原⽂地址:cognos 报错解决⽅法作者:枕头上的⼟⾖
本⼈由于⼯作关系,时常会遇到这样那样的问题,现在⾃我总结⼀下,为了以后可以⽅便应⽤。

错误:(TR3110) An unknown error has occurred during the operation. Please contact Cognos Customer support.
这个是最⿇烦的,因为是未知的错误,⽽且原因我觉得⽐较不确定,当然,⽹上很多⼈都说是由于设置多个CPU造成的,但是我也碰到过单个CPU造成这个情况的。

我⾃⼰觉得⽐较有效的解决⽅法:
双击IQD的属性,就可以看到了,Enable multi processing 前⾯的打勾部分取消。

然后重新⽣成看看,当然也有可能还是报这个错误,那就看⼀下你的数据源是什么如果是oracle10 的话,装⼀下oracle9,那样⽐较不容易出错。

错误:(TR1901) The lowest level partition must span full breadth of their dimension when user calss security w/filter is in force.
解决⽅法: 在每个dimension进⾏设置,选中exclude the dimension from auto_partitioning 就可以解决。

VBA中的错误处理技巧

VBA中的错误处理技巧VBA(Visual Basic for Applications)是一种非常强大的编程语言,常用于Microsoft Office应用程序(如Excel、Word 和PowerPoint)中的自动化操作。

在进行VBA编程时,错误处理是一个重要的方面,它可以帮助我们识别和解决潜在的问题,提高代码的健壮性。

本文将介绍几种常用的VBA错误处理技巧,以帮助您更好地处理和管理错误。

1. On Error语句On Error语句是VBA中最基本的错误处理方法之一。

它允许我们在可能发生错误的代码块前后指定处理方式。

在代码块前使用"On Error Resume Next"语句可以使程序忽略错误并继续执行,而在代码块后使用"On Error GoTo 0"语句可以将错误处理方式重置回默认。

以下是一个示例:```On Error Resume Next' 可能发生错误的代码块On Error GoTo 0```在代码块中,当发生错误时,程序将继续执行后续的语句而不会中断。

这可以在某些情况下很有用,但需要非常小心,因为它可能会导致其他问题被忽略。

另一种常见的用法是使用"On Error GoTo"语句在发生错误时跳转到指定的错误处理代码块。

以下是一个示例:```On Error GoTo ErrorHandler' 可能发生错误的代码块Exit SubErrorHandler:' 错误处理代码块```在此示例中,当发生错误时,程序将跳转到标有"ErrorHandler"的代码块,并执行错误处理逻辑。

2. Err对象Err对象是VBA中用于获取有关错误信息的重要工具。

它提供了许多属性,可以用于检查和处理错误。

以下是几个常用的Err对象属性:- Err.Number:返回错误代码的整数值。

- Err.Description:返回关于错误的文本描述。

BROTHER兄弟机报警说明书

0506(conv)
5506(nc)
Overrun(-X)
超程,而方向是在警报中所指示的
按手动模式,然后按【RST】及同时按下【relse】及按同一轴的相反方向
0507(conv)
5507(nc)
Overrun(+Y)
超程,而方向是在警报中所指示的
按手动模式,然后按【RST】及同时按下【relse】及按同一轴的相反方向
脉冲错误(第6轴)
脉冲信号传送到第6轴马达不能正确地读取
0102(conv)
5102(nc)
Pulse error (*Axis)
脉冲错误(M轴)
脉冲信号传送到M轴马达不能正确地读取
0500(conv)
5500(nc)
Emergency3 sw on
紧急停止制激活
1/紧急停止制被按下
2/外接紧急停止制被开动
检测到问题(现存)
现存板出现错误
通知有关人仕
0003(conv0
5003(nc)
Ram error(main)
暂存体错误(主板)
主板出现错误
通知有关人仕
0004(conv)
5004(nc)
Rom error(slave)
永存体错误(主板)
主板出现错误
通知有关人仕
0005(conv)
5005(nc)
Ram error(main)
0508(conv)
5508(nc)
Overrun(-Y)
超程,而方向是在警报中所指示的
按手动模式,然后按【RST】及同时按下【relse】及按同一轴的相反方向
0509(conv)
5509(nc)
Overrun(+Z)
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Centrotherm 常见错误消除
‐‐‐‐‐‐‐姚骞
Centrotherm里面的错误主要有“Alarm level”和“Abort level”两种,下面列举几个常见
的警报和错误信息。

①错误信息“No boat in source position”界面如下所示:
该错误发生在自动运行过程中由初始位置到目标位置的时候,此时应该检查是否有舟在初始
位置,如果有舟,则应该在“Setup/Correct Boats”里对相应位置的舟进行修改
②错误信息“Process recipe has terminated with error state!”,如下图所
示:
该错误的具体表现为,在自动运行过程中,当进行到工艺的某个步骤时,忽然出现下图所示
的界面提示:
按照提示输入“AB”后,会出现下面的界面
输入“LK”,此时正常运行的工艺就突然中止了,如下图所示:
对该错误的处理措施。

只需要重新手动运行下工艺即可,具体过程如下:
点击“End”按钮,在下一个界面中点击“Recipe”,选中需要的工艺名后,点击“Start”即可:
值得注意的是,在重新运行工艺之后,可能会有下面的界面提示出现:
假如工艺停止时是已经反应完毕,输入“1”把舟取出,假如是工艺尚未结束,输入“0”即可。

③出现小推车取不出来或者小推车送不进去的现象
小推车推不出来的情况主要以下几种可能一是在下面的界面中
“Paddle 1”前面的有个小勾,表明此时桨1上面有舟停留,而实际上桨1上面并没有舟,存在一个“memory error”,这种情况会导致小推车无法取出。

第二种情况是在小推车进去的时候是自动运行状况,有下面的界面出现
由于某种需要,在小推车进去后采用手动模式继续进行下面的操作步骤,而手动结束后并没有取消上述界面,所以小推车取不出来,只要点击“Cancel”就可以了。

第三种情况是传感器出现问题,这种情况多为控制小推车的“light barrier”被挡住了。

对于小推车无法进入的问题,一般只有两种情况,一是“Store2”和“Store 3”同时放置了舟,而正常情况下必须保证三个存储位置必有一个是处于闲置状态的,另一种可能是在“Setup/Boat”界面中,“Store1”前面有小勾,取消就可以了。

④出现错误信息“The Paddle/Store cannot be approached ,as it is occupied
or Tube Ready is missing ”
这个错误常见的原因依然是“memory error”,只要在下面的界面中
观察有小勾的位置与实际是否一致,假如有小勾而实际桨或存储位置并没有对应的舟,则去掉小勾警报即可消除。

⑤正常工艺自动运行状态下,出现舟运行至炉门就忽然停止不动了的现象。

常见的处理措施是点击“Service/recovery/Handling”即可消除错误,如果舟依然不动,可以尝试用“homing”或“unload”这个工艺,如果在“homing”或“unload”工艺运行后舟依然没有任何反应,可以用“Service/IniDevice”,之后再用上述两工艺,就可以拉舟了。

⑥工艺选择错误。

假如说正常工艺是选择A,而在操作的时候选择了B,此时会报警,显示工艺错误,如下面的界面所示
在上述界面中选择正确的工艺然后取消红色的叉,点击“finish”即可运行正常的工艺,或者在“Recipe”里面选择正确的工艺也可以消除此错误。

⑦“ProcFlag=Error”错误的消除。

最简单的办法就是用“homing”这个工艺就可以消除此错误。

⑧pump error
通常在工艺运行中到“Evacuate the tube and pressure test”的时候,就会有pump error
出现。

一般情况下此为正常状况,在一两秒内会自动消除,假如没有自动消除,在acknowledgement 下也无法确认消除,则立即通知设备人员关泵维护。

相关文档
最新文档