This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into 1.2.x
- Loading branch information
Showing
27 changed files
with
125 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// See LICENSE for license details. | ||
|
||
package firrtl | ||
|
||
import scala.util.control.NoStackTrace | ||
|
||
@deprecated("External users should use either FirrtlUserException or their own hierarchy", "1.2") | ||
object FIRRTLException { | ||
def defaultMessage(message: String, cause: Throwable) = { | ||
if (message != null) { | ||
message | ||
} else if (cause != null) { | ||
cause.toString | ||
} else { | ||
null | ||
} | ||
} | ||
} | ||
@deprecated("External users should use either FirrtlUserException or their own hierarchy", "1.2") | ||
class FIRRTLException(val str: String, cause: Throwable = null) | ||
extends RuntimeException(FIRRTLException.defaultMessage(str, cause), cause) | ||
|
||
/** Exception indicating user error | ||
* | ||
* These exceptions indicate a problem due to bad input and thus do not include a stack trace. | ||
* This can be extended by custom transform writers. | ||
*/ | ||
class FirrtlUserException(message: String, cause: Throwable = null) | ||
extends RuntimeException(message, cause) with NoStackTrace | ||
|
||
/** Wraps exceptions from CustomTransforms so they can be reported appropriately */ | ||
case class CustomTransformException(cause: Throwable) extends Exception("", cause) | ||
|
||
/** Exception indicating something went wrong *within* Firrtl itself | ||
* | ||
* These exceptions indicate a problem inside the compiler and include a stack trace to help | ||
* developers debug the issue. | ||
* | ||
* This class is private because these are issues within Firrtl itself. Exceptions thrown in custom | ||
* transforms are treated differently and should thus have their own structure | ||
*/ | ||
private[firrtl] class FirrtlInternalException(message: String, cause: Throwable = null) | ||
extends Exception(message, cause) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.