好风如水
gang613 · 2007-10-12
<< Web应用中Domino附件上传10M限制问题
|
首 页
|
LotusScript Tip之通过GetThreadInfo()获取LS错误信息
- [
技术
]
2007-10-12
Tag:
Domino
版权声明
:转载时请以超链接形式标明文章原始出处和作者信息及
本声明
http://gang613.blogbus.com/logs/10249320.html
通过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(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
随机文章:
Web应用中Domino附件上传10M限制问题
2007-08-16
通过Log off沉默用户提高Domino服务器的性能
2007-08-03
控制Domino 中 Lotus Script Agent输出中的HTML Header
2007-03-02
通过WEBDAV管理Domino中的文件资源
2007-02-27
在Lotus Client中采用LotusScript调用Soap
2006-11-15
收藏到:
Del.icio.us
引用地址:
gang613
发表于
10:05:08
|
编辑
|
继续话题
|
转发
|
推荐
发表评论
原始快照:web.archive.org