Skip to content

Commit 390fda6

Browse files
add reference link of test as well trycatch2
1 parent 75d48d9 commit 390fda6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

man/datatable-condition-classes.Rd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
\name{data.table-error-handling}
22
\alias{data.table-error-handling}
3-
\title{Error Handling with Classed Conditions}
3+
\title{Condition Handling with Classed Conditions}
44
\description{
5-
\code{data.table} provides specific condition classes for common operations, making it easier to handle errors programmatically. This is particularly useful when writing robust code or packages that use \code{data.table}. Relying on the exact text of error messages is fragile (it is not uncommon to change the wording slightly, or for the user's session not to be in English); prefer using the signal class where possible.
5+
\code{data.table} provides specific condition classes for common operations, making it easier to handle comditions programmatically. This is particularly useful when writing robust code or packages that use \code{data.table}. Relying on the exact text of condition messages is fragile (it is not uncommon to change the wording slightly, or for the user's session not to be in English); prefer using the signal class where possible.
66
}
77
\details{
8-
\subsection{Available Error Classes}{
8+
\subsection{Available error Classes}{
99
\code{data.table} provides four specific error classes:
1010
1111
\itemize{
@@ -17,7 +17,7 @@
1717
}
1818

1919
\subsection{Backward Compatibility}{
20-
All error classes inherit from base R's condition system, so existing \code{tryCatch(..., error = ...)} code continues to work unchanged. The new classes simply provide more specific handling options when needed.
20+
All condition classes inherit from base R's condition system, so existing \code{tryCatch(..., error = ...)} code continues to work unchanged. The new classes simply provide more specific handling options when needed.
2121
}
2222
}
2323
\examples{
@@ -33,5 +33,6 @@ tryCatch({
3333
})
3434
}
3535
\seealso{
36-
\code{\link{tryCatch}}, \url{https://adv-r.hadley.nz/conditions.html}
36+
\code{\link{tryCatch}}, \code{\link{test}}, \url{https://adv-r.hadley.nz/conditions.html}
37+
For advanced exception handling patterns, see data.table's internal helper `tryCatch2` here - \url{https://github.com/jangorecki/logR/blob/master/R/logR.R}
3738
}

0 commit comments

Comments
 (0)