Error Err, ">" & Getthreadinfo(LSI_THREAD_PROC) & " (" & Cstr(Erl) & ") " & Error
2011-06-14 15:38
453 查看
此用法很有用,有待研究
通过GetThreadInfo()获得的LSI_INFO,提供了LS的Runtime信息。
GetThreadInfo(11) 返回了调用的class
GetThreadInfo(10) 返回了调用的function
我们可以自己构造一个函数RaiseError() ,用于其他程序的调用。
我们在调用时可以按以下方式使用:
Msgbox Getthreadinfo(LSI_THREAD_MODULE) 在客户端显示 单元的 十六进制,在web下调用会显示脚本名称(在代理中无效)
通过GetThreadInfo()获得的LSI_INFO,提供了LS的Runtime信息。
Code | Meaning |
LSI_THREAD_LINE | Current Line Number |
LSI_THREAD_PROC | Name of current procedure |
LSI_THREAD_MODULE | Name of current module |
LSI_THREAD_VERSION | LotusScript version number |
LSI_THREAD_LANGUAGE | (Human) language setting |
LSI_THREAD_COUNTRY | Country or region setting |
LSI_THREAD_TICKS | Get current clock ticks |
LSI_THREAD_TICKS_PER_SEC | Get clock ticks per second (supported only on platforms that support parallel processing primitives) |
LSI_THREAD_PROCESS_ID | Get current process ID (supported only on platforms that support parallel processing primitives) |
LSI_THREAD_TASK_ID | Get current task ID (supported only on platforms that support parallel processing primitives) |
LSI_THREAD_CALLPROC | Get the name of the calling procedure |
LSI_THREAD_CALLMODULE | Get the name of the calling module |
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 |
相关文章推荐
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) long __stdcall RtlGetVersion(struct _OSVERSIONINFOW
- Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
- Getting "Debug Info" for a Sharepoint error!
- 1>E1400Dlg.obj : error LNK2019: 无法解析的外部符号 __imp__Demo@12,该符号在函数 "protected: v
- Exception in thread "main" java.lang.UnsupportedClassVersionError:Unsupported major.minor version 52
- ERROR: relation "public.userinfo" does not exist
- MyEclipse启动Tomcat出现Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
- <<我的邮件客户端(mutt+getmail+msmtp+procmail)>>
- find -iname "*" | xargs grep network_error 2>/dev/null命令中2>/dev/null的含义
- Exception in thread "main" java.lang.ExceptionInInitializerError
- Error:A potentially dangerous Request.Form value was detected from the (WebEditor1="...bsp; <B>
- 使用 GetStartupInfo 检查自己是否被"调试"
- 【easyUI】<div class="demo-info">
- var fGrid = document.getElementById("<%=gvReturnSgd.ClientID %>") 的理解
- 当使用JQuery的"$",抛异常Uncaught TypeError: Object #<Object> has no method 'ajax'
- When I write #include <qdom.h> it gives error "no such file or directory".
- Exception in thread "main" java.lang.StackOverflowError
- Eclipse 报 “Exception in thread "main" java.lang.OutOfMemoryError: Java heap space ”错误的解决办法以及文本文件换行
- <form action="get.php" method="post" id="tform"> <input type="text" name="one"> <a href="jav
- An internal error occurred during: "Updating Maven Project". > Unsupported IClasspathEntry kind=4