Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates 无法打开模板文件_Templates_Tcl - Fatal编程技术网

Templates 无法打开模板文件

Templates 无法打开模板文件,templates,tcl,Templates,Tcl,我有上面的代码,需要打开一个模板文件,前几天还在工作,昨天刚开始显示无法打开,能帮上什么忙吗?错误消息将出现在res变量中。这应该告诉你什么是错的;将其添加到中止消息中,可能如下所示: # Open user's template file if [catch { set f_id [open "$ex_doc_template_file" r] } res] { # Close output file before abort global html_output_file_i

我有上面的代码,需要打开一个模板文件,前几天还在工作,昨天刚开始显示无法打开,能帮上什么忙吗?

错误消息将出现在
res
变量中。这应该告诉你什么是错的;将其添加到中止消息中,可能如下所示:

# Open user's template file
if [catch { set f_id [open "$ex_doc_template_file" r] } res] {
    # Close output file before abort
    global html_output_file_id

    catch { close $html_output_file_id }

    MOM_abort "$ex_doc_template_file can not be open!"
}
然后你会发现这可能是显而易见的



一般来说,当通过报告某些内容来处理故障时,报告实际的故障消息非常有用,因为这通常说明问题所在。我发现Tcl的消息是有用的,至少对于即时错误是有用的。(当然,更高层次的原因可以考虑。)

该模板文件有任何更改吗?比如文件权限等?我想问题可能就在那里。
MOM_abort "$ex_doc_template_file can not be open! $res"