コード例 #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int i = -1;

            if (DA.GetData(0, ref i))
            {
                CIFem_wrapper.WR_DebugClass debug = new CIFem_wrapper.WR_DebugClass();

                try
                {
                    debug.DivByZero(i);
                }
                catch (DivideByZeroException e)
                {
                    string s = "gotcha!";
                    throw e;
                }
            }


            bool ce = false;

            if (DA.GetData(1, ref ce) && ce)
            {
                CIFem_wrapper.WR_DebugClass debug = new CIFem_wrapper.WR_DebugClass();

                try
                {
                    debug.ThrowCrazyException();
                }
                catch (Exception e)
                {
                    AddRuntimeMessage(GH_RuntimeMessageLevel.Error, e.Message);
                    //throw;
                }
            }

            bool b = false;

            if (DA.GetData(2, ref b) && b)
            {
                CIFem_wrapper.WR_DebugClass debug = new CIFem_wrapper.WR_DebugClass();

                debug.ThrowCrazyException();
            }
        }
コード例 #2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int i = -1;

            if (DA.GetData(0, ref i))
            {
                CIFem_wrapper.WR_DebugClass debug = new CIFem_wrapper.WR_DebugClass();

                try
                {
                    debug.DivByZero(i);
                }
                catch (DivideByZeroException e)
                {
                    string s = "gotcha!";
                    throw e;
                }
            }

            bool ce = false;
            if (DA.GetData(1, ref ce) && ce)
            {
                CIFem_wrapper.WR_DebugClass debug = new CIFem_wrapper.WR_DebugClass();

                try
                {
                    debug.ThrowCrazyException();
                }
                catch (Exception e)
                {
                    AddRuntimeMessage(GH_RuntimeMessageLevel.Error, e.Message);
                    //throw;
                }
            }

            bool b = false;
            if (DA.GetData(2, ref b) && b)
            {
                CIFem_wrapper.WR_DebugClass debug = new CIFem_wrapper.WR_DebugClass();

                debug.ThrowCrazyException();
            }
        }