Displaying 3 results from an estimated 3 matches for "userscriptfile".
2018 Feb 22
2
Problem with geterrmessage()
Luke
Thanks ? I revised the code to:
ERRORMESSAGE <- try(source(USERSCRIPTFILE, local=T), silent=T)
print(ERRORMESSAGE) now returns:
$value
[1] 0
$visible
[1] FALSE
Not clear what to make of that.
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone / Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com
> On Feb 22, 2018, at 12:45 PM, lu...
2018 Feb 22
0
Problem with geterrmessage()
Only the default error handler puts the error message in a buffer
where it can be retrieved with geterrmessage. try() replaces the
default error handler. Either look at the value returned by try() or
use tryCatch with conditionMessage.
Best,
luke
On Thu, 22 Feb 2018, Dennis Fisher wrote:
> R 3.4.3
> OS X
>
> Colleagues
>
> I have a 20K line script in which I encounter an
2018 Feb 22
2
Problem with geterrmessage()
R 3.4.3
OS X
Colleagues
I have a 20K line script in which I encounter an unexpected problem.
If the script detects presence of a particular file USERCODE.txt, it executes:
source(?USERCODE.txt?)
If that file is not present, the script executes without a problem.
There might be syntax errors in USERCODE.txt; therefore, the code above is embedded in a try command: