Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  04 Sep 2024, Stefan Ritt, Info, News MSCB++ API 
    Reply  11 Sep 2024, Konstantin Olchanski, Info, News MSCB++ API 
       Reply  24 Sep 2024, Stefan Ritt, Info, News MSCB++ API 
Message ID: 2857     Entry time: 24 Sep 2024     In reply to: 2830
Author: Stefan Ritt 
Topic: Info 
Subject: News MSCB++ API 
> Where is the example of error handling?

#include "mscbxx.h"
#include "mexcept.h"

...
   try {
   
      // connect to node 10 at submaster mscb123
      midas::mscb m("mscb123", 10);

      // print a variable
      std::cout << m["Input0"] << std::endl;
   
   } catch (mexception e) {
      std::cout << e << std::endl; // simply print exception
   }
...
ELOG V3.1.4-2e1708b5