protected SourceLocation FindFile(ScriptingContext context, string filename, int line) { SourceFile file = Session.FindFile(filename); if (file == null) { throw new ScriptingException("Cannot find source file `{0}'.", filename); } MethodSource source = file.FindMethod(line); if (source == null) { throw new ScriptingException( "Cannot find method corresponding to line {0} in `{1}'.", line, file.Name); } return(new SourceLocation(source, file, line)); }