BDB.ModuleBdbLesController.GetLiftingSurface C# (CSharp) Method

GetLiftingSurface() private method

private GetLiftingSurface ( ) : ModuleLiftingSurface
return ModuleLiftingSurface
        private ModuleLiftingSurface GetLiftingSurface()
        {
            Debug.Log(string.Format("{0} ModulePebkacLesPitchControl.GetLiftingSurface", _myModTag));
            ModuleLiftingSurface myLiftingSurface = null;

            try
            {
                myLiftingSurface = part.FindModulesImplementing<ModuleLiftingSurface>().SingleOrDefault();
            }
            catch (System.Exception x)
            {
                Debug.Log(string.Format("{0} ERROR: {1}", _myModTag, x.Message));
            }

            if (!myLiftingSurface)
            {
                // this shouldn't happen under normal circumstances
                Debug.LogError("ERROR: Didn't find ModuleLiftingSurface on LES nosecone!");
            }

            return myLiftingSurface;
        }