Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

R shiny crashed even after trycatch()

$
0
0

Below is the part of my server code. Actually there is an error in SQL for some conditions. So when I execute in R calling SQL, the R shiny crashes. So i tried putting trycatch(). Even then the app crashes but I can see notifications when app crashes. Please anyone help

if(input$ID != ""&& !is.null(input$Date)){

      # to get data from SQL
      tryCatch({
      # to get data from SQL
      sql <- paste0("SELECT * FROM [SSS].[AAA].[CCC]")
      df1 <- sqlQuery(db, sql)   # db is already declared
        },

      error = function(err){
        showNotification(paste0(err), type = 'err')
      })

Viewing all articles
Browse latest Browse all 206278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>