CancellationException 異常

package test.java.util.concurrent;


import java.util.concurrent.CancellationException;
import org.junit.Test;

/**
 * CancellationException的測試類
 * 取消了一個任務,並再次嘗試獲取任務執行結果將拋出該異常
 * @author zqw
 * @date 2020-06-29 21:29:37
 */
public class CancellationExceptionTest {
        /**
        *
        * @Param
        * @author zqw
        */
        @Test
        public void testConstruct0()throws Exception{
        CancellationException testObj=new CancellationException();
                System.out.println(testObj.getMessage());
        }
        /**
        *
        * @Param
        * @author zqw
        */
        @Test
        public void testConstruct1()throws Exception{
        CancellationException testObj=new CancellationException("cancellationException");
                System.out.println(testObj.getMessage());
        }

}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章