NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
@exception, @throws and code hinting


Joined: 13 Feb 2008
Posts: 32
Reply with quote
Example:

Class a {

/**
* @desc This is sweet stuff
* @throws dbError
*/
function nuts()
{
throws new dbError("Almonds");
}
}

After documenting, when calling the function (typing out) in the ide, there is no code hinting for the @throws, I have tried this with @exception. It will show the description, but that all. Does not show the information in code explorer either.

Does phpEd not support all of phpDoc?

Cheers.
View user's profileFind all posts by linchatSend private message


Joined: 13 Feb 2008
Posts: 32
Reply with quote
If the @throws or @exceptions are not supported, how do others document exceptions with phpdoc?
View user's profileFind all posts by linchatSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
PhpED does support all phpdock things that are helpful with code completion.
I'm not sure how @exception or @throws would be helpful

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Feb 2008
Posts: 32
Reply with quote
Mmmm.. It would be nice to know the type of exception that might be thrown, or that a method is going to throw an exception. If I did code level error checking via booleans (-1,0,1), I can set an @return and know what my return state can be. Without knowing whether a method is going or could throw an exception it leaves the developer open to unchecked exceptions (yes, I know those can be handled).

It would be nice to know while coding that a method is carrying an exception without having to read through @description or some other documentation.
View user's profileFind all posts by linchatSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Yes, it is useful to know if a method can throw an exception. I'll check if we can show this info in Code Explorer

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Feb 2008
Posts: 32
Reply with quote
Looks like the latest release is handling @throws. Good show nusphere, thanks. Have not had the chance to download it yet, but read release notes.
View user's profileFind all posts by linchatSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
sure, it shows @throws now

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
@exception, @throws and code hinting
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic