Changeset 666

Show
Ignore:
Timestamp:
05/08/07 22:37:35 (1 year ago)
Author:
schst
Message:

Closed ticket #33: Added stub-json-rpc-debug.js that can be used while debugging, added example that throws an exception

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/json-rpc/index.php

    r659 r666  
    7272 
    7373<fieldset> 
     74  <legend>Exceptions</legend> 
     75  <input type="button" onclick="math.throwException();" value="Throw an exception on the server"/> 
     76</fieldset> 
     77 
     78<fieldset> 
    7479  <legend>Stateful JSON-RPC example</legend> 
    7580  Name: <input type="text" id="name" size="20"/><br/> 
  • trunk/src/main/php/net/stubbles/examples/service/MathService.php

    r598 r666  
    2020        return $a+$b; 
    2121    } 
     22 
     23    /** 
     24     * Method to throw an exception 
     25     * 
     26     * @WebMethod 
     27     */ 
     28    public function throwException() { 
     29        throw new stubException("This exception is intended."); 
     30    } 
    2231} 
    2332?>