如题,或者是用什么方式可以代替?

解决方案 »

  1.   

    __try 
    {
       // guarded code
    }
    __except ( expression )
    {
       // exception handler code
    }
      

  2.   

    或者
    try {
       // code that could throw an exception
    }
    [ catch (exception-declaration) {
       // code that executes when exception-declaration is thrown
       // in the try block
    }
    [catch (exception-declaration) {
       // code that handles another exception type
    } ] . . . ]
    // The following syntax shows a throw expression:
    throw [expression]
      

  3.   

    try
    {
    }catch( ... )
    {
    }