Error Err, ">" & Getthreadinfo(LSI_THREAD_PROC) & " (" & Cstr(Erl) & ") " & Error
来源:互联网 发布:中国资本主义知乎 编辑:程序博客网 时间:2024/06/08 08:54
此用法很有用,有待研究
通过GetThreadInfo()获得的LSI_INFO,提供了LS的Runtime信息。
CodeMeaningLSI_THREAD_LINECurrent Line Number LSI_THREAD_PROCName of current procedureLSI_THREAD_MODULEName of current moduleLSI_THREAD_VERSIONLotusScript version numberLSI_THREAD_LANGUAGE(Human) language settingLSI_THREAD_COUNTRYCountry or region settingLSI_THREAD_TICKSGet current clock ticksLSI_THREAD_TICKS_PER_SECGet clock ticks per second (supported only on platforms that support parallel processing primitives)LSI_THREAD_PROCESS_IDGet current process ID (supported only on platforms that support parallel processing primitives)LSI_THREAD_TASK_IDGet current task ID (supported only on platforms that support parallel processing primitives)LSI_THREAD_CALLPROCGet the name of the calling procedureLSI_THREAD_CALLMODULEGet the name of the calling module
GetThreadInfo(11) 返回了调用的class
GetThreadInfo(10) 返回了调用的function
我们可以自己构造一个函数RaiseError() ,用于其他程序的调用。
Function RaiseError()
Dim thisType As String
Dim es as String
thisType = Typename(Me)
' Not a class, use the calling module instead
If (thisType = "") Then thisType = Getthreadinfo(11)
es = thisType & "::" & Getthreadinfo(10) & ": "
If (Err = 0) Then
es = es + "Manually raised an error"
Else
es = es + "Run time error: (" + Trim(Str(Err)) + ") " + _
Error$ + " at line: "+ Trim(Str(Erl))
End If
Print es
end function
我们在调用时可以按以下方式使用:
' calling code...
...
ExitFunction:
exit function
errorhandler:
Call RaiseError()
resume exitFunction
end function
Msgbox Getthreadinfo(LSI_THREAD_MODULE) 在客户端显示 单元的 十六进制,在web下调用会显示脚本名称(在代理中无效)
- Error Err, ">" & Getthreadinfo(LSI_THREAD_PROC) & " (" & Cstr(Erl) & ") " & Error
- gyp ERR! build error
- Cognos error DPR-ERR-2082
- npm常见的“ERR! Error”
- ASP的err和error对象小结
- ASP的ERR和ERROR对象
- error A4910 masm32/Bin/ML.err
- npm ERR! tar.unpack untar error
- Error page: / Err…
- npm ERR! tar.unpack untar error
- npm ERR! Error: EACCES: permission denied, access
- on error resume next,On Error Goto 0,Err用法
- ERR! configure error gyp ERR! stack Error: Can't find Python executable "python"
- gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable
- compiler error output to a file named err
- Cognos error DPR-ERR-2079错误问题 解决
- VBScript:err.clear与On error goto 0的区别
- cognos 8 servics启动时报错[ ERROR ] CFG-ERR-0106
- Head First 设计模式——装饰器(Decorator Pattern)——Python实现
- ReactOS-Freeldr注册表HIVE文件格式
- 在给定的图片的右上角加上联系人数量
- vss学习
- treenode的checkbox设置为不能更改
- Error Err, ">" & Getthreadinfo(LSI_THREAD_PROC) & " (" & Cstr(Erl) & ") " & Error
- 对话框的MFC,一点回车就退出
- apache log4j详解
- "MOSS MA not found"的解决办法
- 基于Struts权限实现
- android自带musicplayer源码分析:CreatePlaylist类
- java资源
- AspNetPager分页使用指南
- silverlight 3D 学习资源