Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change warning setting?

Tags:

I am trying to debug a function. I would like to display warnings when they occur but I don't understand how to change the warning settings.

like image 721
VincentH Avatar asked Jun 28 '12 06:06

VincentH


People also ask

How do I change my notification settings on my iPhone?

Go to Settings and tap Notifications. Select an app under Notification Style. Under Alerts, choose the alert style that you want. If you turn on Allow Notifications, choose when you want the notifications delivered — immediately or in the scheduled notification summary.


2 Answers

It may be useful to specify

options(warn=2, error=recover)

As mentioned by @plannapus, warn=2 will upgrade warnings to errors; error=recover will drop you into a debug/browser mode at the point where the warning (now upgraded to an error) occurred. (Use options(warn=0, error=NULL) to restore the original settings.)

like image 136
Ben Bolker Avatar answered Oct 10 '22 13:10

Ben Bolker


Set

options(warn=1)

Read more in ?options

like image 39
Andrie Avatar answered Oct 10 '22 13:10

Andrie