Error Inspector additional warning message returning error instead of warning

rstudio

#1

Hello RStudio Community

I have two functions, f_ that throws an error and f that throws a warning before calling f_ .

f_ <- function() stop()
f <- function() {
  warning()
  f_()
}

Since I have a warning before the error, R produces "additionnal warning messages", but the message in this warning is not my f() warning but the error produced in f_() called a 2nd time :

> f()
Error in f_() : 
In addition: Warning message:
In f() :
  Error in f_() :

While the message should be :

> f()
Error in f() : 
In addition: Warning message:
In f() : 

Thanks to Anders Ellern Bilgrau on StackOverflow I figured out that this "error" is happening only in RStudio and is caused by the Error Inspector. So I can turn Debug > On Error to "Message Only" and it works as expected but since it's for package development, I'm looking for a solution without having to change the RStudio settings.

I'm running R version 3.3.2 on x86_64-w64-mingw32 using RStudio 1.1.442.

Thanks for any help